-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
What is the problem this feature will solve?
The same thing that vm.SourceTextModule(yourCodeString, { identifier, context }) does, but in a way compatible with other JS runtimes.
Useful for implementing extensions, for example.
What is the feature you are proposing to solve the problem?
Compatibilty with other JS runtimes when it comes to import() and blob URLs.
Example code:
code = 'console.log("hi")'
blob = new Blob([code], { type: 'text/javascript' })
url = URL.createObjectURL(blob)
import(url)
References:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
- https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL_static
- https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/blob
What alternatives have you considered?
vm.SourceTextModule(yourCodeString, { identifier, context })
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Projects
Status
Awaiting Triage