saghul / txiki.js

A tiny JavaScript runtime
MIT License
2.49k stars 167 forks source link

Support the Minimum Common Web Platform API #418

Open saghul opened 11 months ago

saghul commented 11 months ago

https://common-min-api.proposal.wintercg.org/


Interfaces:

Global methods / properties:

bnoordhuis commented 10 months ago

To avoid duplication across embedders, atob, btoa, structuredClone1, queueMicrotask and performance could be implemented as quickjs-ng C APIs or JS globals. We'd also have to add DOMException but that seems okay to me. We can make them opt-in when the JSContext is created.

Thoughts?

1 TBD how to handle transferables

saghul commented 10 months ago

Yep makes sense to me, let's do that!

jimmywarting commented 10 months ago

https://github.com/saghul/txiki.js/blob/c7c5aa988356751051f748485db010cee219b446/src/js/polyfills/blob.js#L1-L8

For a better Blob and File polyfill I would recommend taking a look at fetch-blob

saghul commented 10 months ago

Thanks!

guest271314 commented 9 months ago

navigator.userAgent. See https://github.com/wintercg/proposal-common-minimum-api/issues/62.

saghul commented 9 months ago

navigator.userAgent. See wintercg/proposal-common-minimum-api#62.

Done in https://github.com/saghul/txiki.js/pull/439

guest271314 commented 9 months ago

Ehe WinterCG folks banned me from over there at Minimum Common world already. No notice, no reason given. Weak. Anyway, carry on.