Repository navigation
Conversation
`boa_runtime` implements `URL`, `TextEncoder` and `TextDecoder`, and nothing registered them. Only `Console` was, so a page received a JavaScript engine with a console and no web platform around it. The failure this came from does not look like a missing global. `@solidjs/router` constructs a `URL` during module evaluation, so a router-based application does not break when you navigate: it throws before the first component renders. What you see is a blank page and one line in the log naming the entry chunk, which is why this survived so long. Registered per extension rather than through `boa_runtime::register`, which would also install its own `setTimeout`/`setInterval` over the ones in `timers.rs` that are wired to this document's event loop. `URLSearchParams` is still missing, and `URL.searchParams` still throws "not implemented" from `boa_runtime` itself. Both need fixing upstream in the fork rather than papered over here.
Owner
Author
|
Folded into #89. The commit is cherry-picked there and its four tests pass on that branch. One branch for the series means one 0.4.x release rather than two. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
boa_runtimeimplementsURL,TextEncoderandTextDecoder, and nothing registered them. OnlyConsolewas, so a page received a JavaScript engine with a console and no web platform around it.The failure does not look like a missing global
@solidjs/routerconstructs aURLwhile its module is evaluating. So a router-based application does not break when you navigate — it throws before the first component renders. What you see is a blank page and one line in the log naming the entry chunk, which is why this survived so long.Found while trying to run fleet sites under
qa-inspect-host: none of them could boot.The change
Registered per extension rather than through
boa_runtime::register, which would also install its ownsetTimeout/setIntervalover the ones intimers.rsthat are wired to this document's event loop.Tests
Four, in
packages/blitz-script/tests/whatwg_url.rs. Each reads a parsed field rather than checking that a constructor exists, because a constructor that exists and returns a bare object would satisfy the weaker test:../cagainst/a/b/d), the half a naive stub gets wrongnew URL("/x")throws whether the constructor is missing or the string is bad, so "it threw" alone would pass against noURLat allTextEncoderround-trips a non-ASCII character, where a byte-per-char stub divergesWith the registration removed, three of the four fail.
Still missing
This does not finish the job.
URLSearchParamsis absent andboa_runtime's ownURL.searchParamsthrows "not implemented", so a router still cannot boot. Also absent, measured by probe page:matchMedia,fetch/Headers/Request/Response,MutationObserver,ResizeObserver,IntersectionObserver,AbortController,DOMParser,Blob,FormData,localStorage,sessionStorage;document.getElementsByTagName,createTreeWalker,createRange,adoptNode,evaluate; andinsertAdjacentHTML,attachShadow,scrollIntoView,animateon elements.URLSearchParamsis the next blocker and belongs in theps-boafork rather than here.