-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Load @HTMLImport before @javascript (#1038)
Typically HTML imports do not have external dependencies but define their dependencies inside the HTML. On the other hand, there are situations where you want to load an extension/plugin for an HTML import (web component) after the HTML import has been loaded. To order is therefore changed to HTML first, JS later. To load HTML/JS in a predefined order, use Page.addHtmlImport/Page.addJavaScript which will load the files in the order the methods are called.
- Loading branch information
Showing
5 changed files
with
36 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
2 changes: 2 additions & 0 deletions
2
...ts/test-resources/src/main/resources/META-INF/resources/test-files/html/htmlimport4-js.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This should always be loaded after htmlimport4.html | ||
logMessage("HTML import 4 companion JS loaded"); |
This file contains 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
This file contains 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