diff --git a/package.json b/package.json index 37f5ac8..733ebe4 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leuffen/jodastyle", - "version": "3.1.1", + "version": "3.1.2", "description": "", "main": "./dist/index.js", "module": "./dist/index.module.js", diff --git a/src/component/joda-content-element.ts b/src/component/joda-content-element.ts index ae22a03..9da64d6 100755 --- a/src/component/joda-content-element.ts +++ b/src/component/joda-content-element.ts @@ -116,6 +116,7 @@ export class JodaContentElement extends HTMLElement { for(let callback of allTemplatesConnectedCallbacks) { await callback(); } + window.dispatchEvent(new CustomEvent("JodaContentReady", {detail: {element: this}})); } diff --git a/src/processor/jodastyle.ts b/src/processor/jodastyle.ts index ec76a84..485876d 100755 --- a/src/processor/jodastyle.ts +++ b/src/processor/jodastyle.ts @@ -34,6 +34,7 @@ export class Jodastyle { continue; } child["joda-style-processed"] = true; + let origChild = child; let style = getComputedStyle(child); let parentStyle = null; @@ -73,6 +74,7 @@ export class Jodastyle { } await this.process(child); // Recursive parse replaced elements + } }