This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Support ES6 Style Modules with Webpack#19
Open
seanking wants to merge 2 commits intoLinearSoft:masterfrom
Open
Support ES6 Style Modules with Webpack#19seanking wants to merge 2 commits intoLinearSoft:masterfrom
seanking wants to merge 2 commits intoLinearSoft:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.