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

Comments

Support ES6 Style Modules with Webpack#19

Open
seanking wants to merge 2 commits intoLinearSoft:masterfrom
seanking:master
Open

Support ES6 Style Modules with Webpack#19
seanking wants to merge 2 commits intoLinearSoft:masterfrom
seanking:master

Conversation

@seanking
Copy link

@seanking seanking commented Jan 3, 2020

The script doesn't work properly using ES6 style modules and Webpack, ES6 modules and Webpack cause the script to be executed before the DOM is loaded, therefore the reference to the body element is undefined. Since the body element is undefined, the timeout dialog will never be presented to the user.

This change will delay the assignment of the body reference until the api.start(...) method is executed.

Sean King added 2 commits January 3, 2020 10:36
Wait until the api.start(...) method is executed before looking up the
body element. Loading the script before the DOM is loaded will
results in the body element being undefined.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant