Skip to content

Commit

Permalink
Merge pull request #191 from mixpanel/micah-preinitializehook
Browse files Browse the repository at this point in the history
Add component pre-init hook
  • Loading branch information
micaww authored Feb 14, 2024
2 parents 155ce3a + 167d5d3 commit 5915fa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ class Component extends WebComponent {
}
}

this.dispatchEvent(new CustomEvent(`preComponentInitialized`, {detail: {el: this}, bubbles: true, composed: true}));

this.domPatcher = new DOMPatcher(this.state, this._render.bind(this), {
updateMode: this.getConfig(`updateSync`) ? `sync` : `async`,
postRenderCallback: this.postRenderCallback,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "panel",
"version": "6.1.2",
"version": "6.2.0",
"description": "Web Components with Virtual DOM: lightweight composable web apps",
"main": "build/index.js",
"types": "lib/index.d.ts",
Expand Down

0 comments on commit 5915fa1

Please sign in to comment.