Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module item visibility #4

Open
swfsql opened this issue Aug 9, 2020 · 0 comments
Open

Module item visibility #4

swfsql opened this issue Aug 9, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@swfsql
Copy link
Owner

swfsql commented Aug 9, 2020

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.

@swfsql swfsql added the enhancement New feature or request label Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant