Open
Description
Is your feature request related to a problem? Please describe.
In addition to what the NativeScript runtimes provide, they should also provide all the common interfaces and global objects expected from any state of the art JavaScript runtime. WinterCG is a community group doing excellent work in this space to help runtime interoperability of APIs across runtimes.
- https://wintercg.org/work
- https://common-min-api.proposal.wintercg.org/
Describe the solution you'd like
Ensure compliance with at least the minimum specification:
Interfaces:
- AbortController
- AbortSignal
- Blob
- ByteLengthQueuingStrategy
- CompressionStream
- CountQueuingStrategy
- Crypto 8.8
- CryptoKey
- DecompressionStream
- DOMException
- Event
- EventTarget
- File
- ReadableByteStreamController
- ReadableStream
- ReadableStreamBYOBReader
- ReadableStreamBYOBRequest
- ReadableStreamDefaultController
- ReadableStreamDefaultReader
- SubtleCrypto 8.8
- TextDecoder
- TextDecoderStream
- TextEncoder
- TextEncoderStream
- TransformStream
- TransformStreamDefaultController
- URL 8.7
- URLPattern
- URLSearchParams 8.7
- WritableStream
- WritableStreamDefaultController
Global methods / properties:
- globalThis.atob() 8.8
- globalThis.btoa() 8.8
- globalThis.console
- globalThis.crypto 8.8
- globalThis.navigator.userAgent
- globalThis.queueMicrotask()
- globalThis.setTimeout() / globalThis.clearTimeout()
- globalThis.setInterval() / globalThis.clearInterval()
- globalThis.[structuredClone()](https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- I agree to follow this project's Code of Conduct
Reacted by Juan de Dios Martínez Vallejo, Dj, Angel D. Munoz, Daniel Herr, Jason, Yevhenii Herasymchuk and Paul O
Reacted by Angel D. Munoz, Yevhenii Herasymchuk and Paul O
Activity
MrSnoozles commentedon Feb 24, 2024
@NathanWalker I needed
queueMicrotaskfor the latest Vue Apollo Client to work. I polyfilled it usingwhich works perfectly. The
queue-microtasklibrary is effectively 5 lines of code, so that could be added easily as well.dangrima90 commentedon Feb 26, 2024
@NathanWalker I've a question about the polyfills that will be eventually implemented. I see that in the list above there's no mention of
IntlAPI. My main point of interest is theNumberFormatclass, as currently to support number formatting via.toLocaleString(), or be to able to useformatToParts(), polyfills have to be used (such as format js polyfills).Is this something out of scope for this update please?
NathanWalker commentedon May 6, 2024
@dangrima90
Intlwill be an optional package you could include when your app needs it vs. being built into runtime by default.jasongitmail commentedon Jul 19, 2024
@NathanWalker Interesting to note (if only for others searching issues like me) that
Intl.NumberFormat()partially works in the NativeScript runtime currently, making it seem buggy.I was attempting to use it to detect whether a dot or comma thousands separator should be used, but NativeScript always formats with a
,thousands separator (for every locale I've tried), whereas the same code in Chrome on MacOS will use a dot thousands separator when appropriate for the locale.Expected result (Chrome MacOS)
[-]WinterCG Minimum Common Web Platform API Alignment[/-][+]WinterTC Minimum Common Web Platform API Alignment[/+]