A1. 以下是 XUL element 通用的屬性 (attribute) 列表
https://developer.mozilla.org/en/XUL_element_attributes我想 class 這個屬性應該是您要的。
A2.
1. 這是 contentWindow 這個性質 (property) 的說明
https://developer.mozilla.org/en/XUL/Property/contentWindow請注意 window object
in the element 這句
如果寫 cb.contentWindow,取得是 cb 「裡」的視窗物件,cb 是父,視窗是子
若 cb 本身是個 Frame 或 iFrame,這是 OK 的,
但如果要的是包含 cb 的那個視窗,並不能這樣寫
2. 這是 MDC 針對 dispatchEvent 的說明
https://developer.mozilla.org/En/DOM/Element.dispatchEvent其實百分之八九十大同小異,但請注意:
initMouseEvent 的 type 建議改為 click (點擊一次),mousedown是指滑鼠按下後都沒放開
我不知道這會不會是問題的關鍵所在
3. 單就您的程式來說,只是送出中鍵事件,
一旦使用者本身沒將 FX 進階選項的 auto scroll mode 打勾,就算中鍵事件有送出也不會出現 icon
若要用程式開啟 auto scroll mode,得先取得
browser 物件或
tabbrowser 物件
這可利用
getBrowserForDocument 或
getBrowserAtIndex 或
getBrowserForTab 的 method 來達成
然後將其
autoscroll 屬性設為 true,之後再送出中鍵事件即可出現 icon
4. 這是 XUL 說明總表,有物件、屬性、性質、方法等,值得參考
https://developer.mozilla.org/en/XUL_Reference5. 此外,這種跟程式開發有關的應該到特別議題 -> 程式開發討論區去發問,會比較容易得到回應
擴充套件討論區比較偏向於聊使用面而非開發面 ^ ^"