Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Provide read-only access to the parsed mapping object #128

@bahrus

Description

@bahrus

It would only take a single line of code for application logic to parse the JSON string of the importmap:

const p = JSON.parse(document.head.querySelector('script[type="importmap"]').innerHTML)

But assuming the browser will parse it, could it not expose the parsed object in some way?

I know the intention is to not allow for adding metadata, but scheming developers like me will still probably be quite tempted to add metadata (for example, appending #myMetaInfo= after the path to a js file).

Any harm done in exposing the parsed object? That could reduce cpu a bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions