Properly instantiate inline module scripts#2604
Merged
Conversation
429c77a to
d72655e
Compare
This was referenced May 4, 2017
GeorgNeis
approved these changes
May 12, 2017
GeorgNeis
left a comment
There was a problem hiding this comment.
rubberstamp lgtm to unblock larger revisions
This moves the latter half of the "internal module script graph fetching procedure" into "fetch the descendants of a module script", which is then renamed "fetch the descendants of and instantiate a module script". Then, the inline script code can properly call this new algorithm to take care of everything once it has an initial module script prepared from the inline script source. Fixes #2544.
d72655e to
b520372
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This moves the latter half of the "internal module script graph fetching
procedure" into "fetch the descendants of a module script", which is
then renamed "fetch the descendants of and instantiate a module script".
Then, the inline script code can properly call this new algorithm to
take care of everything once it has an initial module script prepared
from the inline script source.
Fixes #2544.
This is on top of #2595 so shouldn't be merged until that is.
Tests for this exist all over https://github.com/w3c/web-platform-tests/tree/master/html/semantics/scripting-1/the-script-element/module, since without it inline module scripts just don't work at all.
If you want to review this, review only the second commit. Also be aware that a lot of the diff is just moving text around, so it's not as big of a change as it seems.
A preview of this, along with #2595 and #2625, is at https://dl.dropboxusercontent.com/u/20140634/modules-all-better/index.html