Skip to content

document.currentScript is not defined when executing in scope="none"  #10

Open
@sashafirsov

Description

@sashafirsov

For microapplication concept it is crucial to have an embedded script serving and accessing the content directly around the script without the need to identify the surrounding DOM. I.e. ability to traverse DOM starting from current script. The way around like dom identified with ID unfortunately is not universal as it could be multiple microapplications ( including same type ) presented on same host page. The dom insulation is not always applicable as scope=none disables insulation.

The cause of currentScript is not defined is in dynamic script loading. Under standard only scripts which are part of initial HTML will be given document.curentScript set.

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