소스 검색

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')