Skip to content

Commit

Permalink
fix: include TramLite object in tl-effects (v4.2.7)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRJurman committed Nov 1, 2023
1 parent 4b22194 commit 2e749f9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tram-lite",
"version": "4.2.3",
"version": "4.2.7",
"description": "💡 HTML library for building and enhancing web-components",
"homepage": "https://tram-one.io/tram-lite/",
"repository": "https://github.com/Tram-One/tram-lite",
Expand Down
6 changes: 5 additions & 1 deletion src/processors/ComponentEffect.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class ComponentEffect {

// provide a scoped evaluation of the script tags in this element
const scopedEval = (script) => {
return Function('document', 'window', script).bind(hostElement)(hostElement.shadowRoot, window);
return Function('document', 'window', 'TramLite', script).bind(hostElement)(
hostElement.shadowRoot,
window,
TramLite,
);
};

scopedEval(scriptTag.innerHTML);
Expand Down

0 comments on commit 2e749f9

Please sign in to comment.