-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve data binding for not defined elements (#16)
- Loading branch information
1 parent
74b5d0f
commit 1154b06
Showing
7 changed files
with
56 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@workleap/r2wc": patch | ||
--- | ||
|
||
Fix a bug: Resolve web elements "data" properties even if they have been set sooner than the element gets defined. |
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
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 |
---|---|---|
@@ -1,5 +1,20 @@ | ||
import { MovieWidgets } from "/cdn/movie-widgets/index.js"; | ||
|
||
MovieWidgets.initialize({ | ||
theme: document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light" | ||
}); | ||
const head = document.getElementsByTagName("head")[0]; | ||
|
||
const link = document.createElement("link"); | ||
link.rel = "modulepreload"; | ||
link.href = "/cdn/movie-widgets/index.js"; | ||
|
||
head.insertBefore(link, head.firstChild); | ||
|
||
const script = document.createElement("script"); | ||
script.src = "/cdn/movie-widgets/index.js"; | ||
script.type = "module"; | ||
script.onload = () => { | ||
window.MovieWidgets.initialize({ | ||
theme: document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light" | ||
}); | ||
}; | ||
|
||
head.appendChild(script); | ||
|
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
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