Skip to content

Module item visibility #4

@swfsql

Description

@swfsql

The API expects some callback implementations, such as for the event functions (eg. OverlayOpened).

ovrt-helper.js declares a function in the global scope, but the one declared by ovrt-sys, is only visible by the module scope.
That item may be exported from the module, and imported into a script on index.html. Such script may also re-export it, but then the consumer would need to import those items.

Currently, to workaround this module scope limitation, an object is created on the global window namespace, and then such object gathers those functions (that need to be exported), which then is used in the re-declaration of such functions in the global namespace.

The workaround works, but preferably the consumer would import the items from the module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions