2026年4月30日 星期四

抓取 dom 標籤的正則

// 抓取所有標籤 

/<!([^]{0,}?)>|<([a-z][^]{0,}?)(?:\s[^]{0,}?|)([\/]?)>|<\/([a-z][^]{0,}?)>/sg

-------------------------------

// 抓取有 attr 的標籤 

// 可以避免 <script> 內容的干擾

// 先試圖抓取有問題的標籤 <script>...</script> 

/<script(|\s.*?)>.*?<\/script>|(?<=<[^/][^\/>\s]+)(\s[^\/>]+)(?=\/?>)/gs; 

 

javascript 正則需要跳脫的字元

 . ^ $ * + ? ( ) [ ] { } | \ /

2026年4月10日 星期五

to do

prop 完善 

state ------ objProxy  listener test(找機會再測試)

view.msg(把錯誤資料綁定在 observer 上)

 ---------------------- 

tempale.bracket

(注意 html load 順序) 

 

view manager

如何匯入不同的 viewModule  

 ---------------------- 

view.bracket  

view.loader

(注意 html load 順序) 

 ---------------------- 

view.watch(用 onCommited 取代)

不要依次用 watch 發射 event

 ----------------------

form 的修改,

大多採用舊的簡易 prototype 避免麻煩 

尤其是id 設置方式

(根據主要資料 id, attr-name)混合

沒有 id ,或撞 id 則不用 cache

 

form.focus 

記錄 foucusin,然後 form 設置在 callback_onCommited 

 ----------------------

form 測試 

 ----------------------

template static 

 

 ---------------------- 

view.template.setting 完善

template.server 的設定最晚弄

 

view.loading 測試 

model.init

model.store ??? 

測試 workerMnanger 正不正確 

 ---------------------- 

測試 view compile by server (用 iframe 比較簡單)

 

2026年4月6日 星期一