Skip to content

Is importing JS modules in the source phase expected to throw? #74

@lpardosixtosMs

Description

@lpardosixtosMs

From the JS Module Source section in github I understand that importing a JS module in the source phase should return a valid object with AbstractModuleSource.prototype in the prototype chain, but from the spec, I understand that it should throw. What is the expected behavior?

Here is how I'm reading the spec:
 
HTML's create a JavaScript module script calls TC39's Parse Module, which is not modified in the source phase import proposal, so it leaves the Abstract Module Record's new [[ModuleSource]] slot EMPTY. So that would throw in the Linking inside InitializeEnvironments when checking the imports and for dynamic imports in ContinueDynamicImport when finishing the import for the JS script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions