jsdom / whatwg-url

An implementation of the WHATWG URL Standard in JavaScript
https://jsdom.github.io/whatwg-url/
MIT License
371 stars 94 forks source link

"ReferenceError: Can't find variable: whatwgURL" on Safari 14.1 #187

Closed csharrison closed 3 years ago

csharrison commented 3 years ago
  1. Navigate to https://jsdom.github.io/whatwg-url/#url=aHR0cHM6Ly9leGFtcGxlLnRlc3Qv&base=YWJvdXQ6Ymxhbms=
  2. See ReferenceError: Can't find variable: whatwgURL in the "jsdom/whatwg-url's components" section
  3. See the following console errors:
    • [Error] TypeError: Shared WebAssembly.Memory and SharedArrayBuffer are not enabled
    • [Error] ReferenceError: Can't find variable: SharedArrayBuffer

It would be very useful if this worked in Safari. Is the dependency on SharedArrayBuffer required?

domenic commented 3 years ago

We've tried to work around this a few times; I guess it keeps breaking? https://github.com/jsdom/whatwg-url/commit/2083a47cd0d9d981bb7bb228606e5a9f077d7a3b was the latest attempt...

csharrison commented 3 years ago

What is the dependency on SharedArrrayBuffer used for? If this issue keeps coming up we could consider an alternative primitive.

domenic commented 3 years ago

It's part of a support library for our Web IDL bindings. It's not really used directly, but messing with the dependency (which is Node.js-focused) is going to be tricky.