Skip to content

Commit

Permalink
Merge pull request #102 from Rezact/add-rezact-rendered-event2
Browse files Browse the repository at this point in the history
add rezact rendered event
  • Loading branch information
zachlankton committed Jan 26, 2024
2 parents 886357f + 9233d82 commit 26c09ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rezact/rezact",
"version": "1.0.15-beta.50",
"version": "1.0.15-beta.51",
"type": "module",
"description": "Intuitive Reactivity, Simplified State. Embrace a modern UI framework that encourages direct data mutations, offers module-level reactivity, and simplifies component design. With Rezact, you get the power of reactivity without the boilerplate. Dive into a seamless development experience tailored for today's web.",
"main": "index.cjs",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/rezact/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ export function render(root, tagName, attributes: any = {}) {
appendChild(root, elm);
}
afterRenderHooks.forEach((func) => func());

inRender = false;
const event = new CustomEvent("rezact-rendered");
document.dispatchEvent(event);

if (location.hash) {
const elm = document.querySelector(location.hash);
setTimeout(() => {
Expand Down

0 comments on commit 26c09ac

Please sign in to comment.