Skip to content

Commit

Permalink
Update loadWidgets.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lesichkovm authored Jun 21, 2023
1 parent cbc92e7 commit 0a631e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions loadWidgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ function loadWidgets() {
fetch(url).then(function(response) {
return response.text();
}).then((html)=>{
// Load HTML
widget.innerHTML = html;

// Execute scripts
const codes = widget.getElementsByTagName("script");
for (var i=0; i < codes.length; i++) {
eval(codes[i].text);
}
});
});

Expand Down

0 comments on commit 0a631e5

Please sign in to comment.