Replies: 1 comment
-
It would be interesting to include things like NavigatorID, NavigatorConcurrentHardware, etc. from something like https://github.com/skdhg/node-navigator so that we don't need to reinvent the wheel. See web4more/html-navigator#9 for ideas for future improvements to the navigator interface over there |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How spec compliant do you want to be? 🤔 For instance, in my own endeavor to make
prompt()
work in Node.js, I tried to follow the spec as closely as possible, even implementing thecannotShowSimpleDialogs()
spec-defined function instead 🤣I prefer to implement things almost word-for-word what the spec says unless there's a really good speed optimization or the algorithm is literally platform-incompatible. 😁
This has the advantage of letting future poyfills or extensions use spec-defined algorithms (like "cannotShowSimpleDialogs") directly via
import cannotShowSimpleDialogs from "@jcbhmr/html-user-prompts/cannotShowSimpleDialogs.js"
instead of reimplementing them on their own. This is especially useful for low-level specs like https://encoding.spec.whatwg.org/ and https://infra.spec.whatwg.org/For instance, the WorkerGlobalScope isn't quite as comprehensive as it's made in the preload script; there's another DedicatedWorkerGlobalScope layer on top of it!
Beta Was this translation helpful? Give feedback.
All reactions