Support for `import(blobUrls)`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
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 })
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem vorgeschlagenen import(url)-Beispiel und vergleiche es mit vm.SourceTextModule(yourCodeString, { identifier, context }). Überprüfe das referenzierte Verhalten von import(), URL.createObjectURL() und Blob-URLs, um das Kompatibilitätsziel zu definieren. Als abgeschlossen gilt die Aufgabe, wenn das Beispiel mit einer von Blob erstellten JavaScript-URL in Node.js funktioniert und dem relevanten Laufzeitverhalten entspricht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, node.js
- Bereich
- backend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100