|
1 <?xml version="1.0"?> |
|
2 |
|
3 <bindings xmlns="http://www.mozilla.org/xbl" |
|
4 xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
5 <binding id="element-popup"> |
|
6 |
|
7 <implementation implements="nsIPopupBoxObject"> |
|
8 <method name="showPopup"> |
|
9 <parameter name="srcConent"/> |
|
10 <parameter name="xpos"/> |
|
11 <parameter name="ypos"/> |
|
12 <parameter name="popupType"/> |
|
13 <parameter name="anchorAlignment"/> |
|
14 <parameter name="popupAlignment"/> |
|
15 <body> |
|
16 <![CDATA[ |
|
17 this.style.visibility = 'visible'; |
|
18 this.style.left = xpos + "px"; |
|
19 this.style.top = ypos + "px"; |
|
20 ]]> |
|
21 </body> |
|
22 </method> |
|
23 |
|
24 <method name="hidePopup"> |
|
25 <body> |
|
26 <![CDATA[ |
|
27 this.style.visibility = 'hidden'; |
|
28 let event = document.createEvent("Events"); |
|
29 event.initEvent("popuphidden", true, false); |
|
30 let dispatcher = this; |
|
31 dispatcher.dispatchEvent(event); |
|
32 ]]> |
|
33 </body> |
|
34 </method> |
|
35 </implementation> |
|
36 </binding> |
|
37 </bindings> |