-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic conversion of ""platform"" code #14
Comments
Yeah, we're actively exploring building such tooling in the Chrome team too. I jotted down some initial notes at https://github.com/domenic/get-originals#automatic-rewritingenforcement-of-robustness. |
How would you reliably detect usage of prototype methods? For example, ".has" does a brand check on Maps, but it could be called on any object at all, and many objects will have a method called "has". |
There's a lot of options, and a lot of exploration left to do. Off the top of my head:
|
I think there is a lot of value in prototyping a tool that converts "regular" code not using originals into code that is "safe" and using originals.
Ideally, we would use such a tool in Node.js to enforce nodejs/node#18795 and the web platform can use it to safely write APIs in JavaScript and expose them to the window.
This would require optimisation from the engine in order to be viable for platforms but this is definitely interesting to us.
Once the semantics here are finalised (let me know) I would love to take a stab at this and possibly build such a tool under the Node.js foundation. (cc @hashseed)
The text was updated successfully, but these errors were encountered: