Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <!-- This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | - License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
michael@0 | 5 | |
michael@0 | 6 | <bindings xmlns="http://www.mozilla.org/xbl" |
michael@0 | 7 | xmlns:html="http://www.w3.org/1999/xhtml"> |
michael@0 | 8 | |
michael@0 | 9 | <binding id="prettyprint"> |
michael@0 | 10 | |
michael@0 | 11 | <content><html:div id='top'/> |
michael@0 | 12 | <html:span style="display: none;"><children/></html:span> |
michael@0 | 13 | </content> |
michael@0 | 14 | |
michael@0 | 15 | <handlers> |
michael@0 | 16 | <handler event="click" button="0"> |
michael@0 | 17 | <![CDATA[ |
michael@0 | 18 | try { |
michael@0 | 19 | var par = event.originalTarget; |
michael@0 | 20 | if (par.nodeName == 'div' && par.className == 'expander') { |
michael@0 | 21 | if (par.parentNode.className == 'expander-closed') { |
michael@0 | 22 | par.parentNode.className = 'expander-open'; |
michael@0 | 23 | event.originalTarget.firstChild.data = '\u2212'; |
michael@0 | 24 | } |
michael@0 | 25 | else { |
michael@0 | 26 | par.parentNode.className = 'expander-closed'; |
michael@0 | 27 | event.originalTarget.firstChild.data = '+'; |
michael@0 | 28 | } |
michael@0 | 29 | } |
michael@0 | 30 | } catch (e) { |
michael@0 | 31 | } |
michael@0 | 32 | ]]> |
michael@0 | 33 | </handler> |
michael@0 | 34 | <handler event="prettyprint-dom-created" allowuntrusted="false"> |
michael@0 | 35 | <![CDATA[ |
michael@0 | 36 | document.getAnonymousNodes(this).item(0).appendChild(event.detail); |
michael@0 | 37 | ]]> |
michael@0 | 38 | </handler> |
michael@0 | 39 | </handlers> |
michael@0 | 40 | |
michael@0 | 41 | </binding> |
michael@0 | 42 | |
michael@0 | 43 | </bindings> |