Gost-DOM is still in version 0.x and not all features are supported.
Don't hesitate to Start a discussion or Submit an issue if you need any of the features missing.
User feedback helps setting the direction and prioritising development.
Missing features described here may have been implemented. Check the linked issue if applicable.
Opening windows with isolated script context, sharing a cookie store.
The browser supports plain JavaScript, either as content in a <script>
element, or <script src="">.
asyncis ignored.deferwill delay script execution until the DOM has parsed.<script type="module">imports an ES module. Import maps are not supported, so anyimportstatement in the script must be a valid href.- WASM is not supported.
- Time does not advance by itself, e.g., for
setTimeout/setCallbackto execute. Test code controls the passing of time. - The
Dateobject does not reflect passing of simulated time.
The web specifications are grouped into different Web APIs. Of these, the following are partially implemented:
- Document Object Model (DOM)
- HTML DOM
- URL
- XMLHttpRequest
- Console (sort of)
- History
- Fetch
- Encoding
- Streams
So no location API, no session storage, cookies API, etc. (Cookies work, but not exposed to JavaScript)
Note that an modular approach is envisioned for these APIs, allowing implementations to be build independently.
- Only supports HTML documents. No support for XML or XHTML documents, as well as namespaces.
Element.outerHTMLandinnerHTMLoutput is not properly escaped.- No support for shadow DOM.
- MutationObserver - In progress
- Opening a window returns an error if the server response with a non-200 status code.
- All HTML elements have the correct class in JavaScript, but only a few have element-specific behaviour is implemented..
Note: The result can still be used when there is a bad HTTP status code. But there is no differentiation between a network error, and an HTTP status error.
Specific HTML elements have specific behaviour.
<a>Click will navigate to the resource. Fragments are not handled (i.e., a fragment link generates an HTTP request, but shouldn't)<form><input><button>/<input type="submit">When clicked inside a form, submits.- Overriding
methodandactionis not implemented. #10
- Overriding
- Reset behaviour is not implemented (either as a call to
.reset()or clicking a reset button/input element - Missing validation. #30
<template>exposes its HTML children as children of thecontentattribute.
The list of supported user interaction is quite limited.
HTMLElemet.click()
However, you can set value content attributes on input fields until proper
keyboard typing is simulated.
- Doesn't support object URLs #69
- Iterating
URLSearchParamsdoesn't iteraiting the values in the order they appear in the query string. #86
XMLHttpRequest- Only text response is supported.
- Not all events are emitted, e.g. progress on file upload, but file upload isn't supported at all, so ...
FormData- Doesn't support file/blob objects
- Console functions exist, but they are just the ones V8 provides. Logging can be directed back to Go code, see Getting started
- Setting attributes on
window.historyhas no effect, i.e., it doesn't navigate.
This is so far very limited in capabilities. Only enough has been implemented to support some basic Datastar cases.
-
Fetch options
method,headers,body, andsignalare supported. -
Only basic
ReadableStreamsupport, and no BYOB reader.