content/xml/document/resources/XMLPrettyPrint.xml

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial