Browse Source

feature(init event)

Ryan Chandler 5 years ago
parent
commit
b100d629aa
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/index.js

+ 2 - 0
src/index.js

@@ -16,6 +16,8 @@ const Spruce = {
     start: async function () {
         await domReady()
 
+        this.emit('init')
+
         document.querySelectorAll('[x-subscribe]').forEach(el => {
             el.setAttribute('x-init', buildInitExpression(el))
             el.removeAttribute('x-subscribe')