فهرست منبع

feature(init event)

Ryan Chandler 5 سال پیش
والد
کامیت
b100d629aa
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  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')