Ignore:
Timestamp:
Apr 5, 2017, 4:20:54 PM (4 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
e33935
Parents:
f440ee
Message:

newChannel --> newChannel2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/bindings/vI_htmlTextBox.xml

    rf440ee r647573  
    186186        <parameter name="aURL" />
    187187        <body><![CDATA[     
    188         // read the chrome file (copied from http://forums.mozillazine.org/viewtopic.php?p=921150)
    189         var ioService=Components.classes["@mozilla.org/network/io-service;1"]
     188                var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
     189                // read the chrome file (copied from http://forums.mozillazine.org/viewtopic.php?p=921150)
     190        var ioService=Cc["@mozilla.org/network/io-service;1"]
    190191            .getService(Components.interfaces.nsIIOService);
    191         var scriptableStream=Components
    192             .classes["@mozilla.org/scriptableinputstream;1"]
     192        var scriptableStream=Cc["@mozilla.org/scriptableinputstream;1"]
    193193            .getService(Components.interfaces.nsIScriptableInputStream);
    194        
    195         var channel=ioService.newChannel2(aURL,null,null);
     194                Cu.import("resource:///modules/imServices.jsm");
     195        var channel=ioService.newChannel2(aURL, null, null, null,
     196                                          Services.scriptSecurityManager.getSystemPrincipal(),
     197                                          null,
     198                                          Ci.nsILoadInfo.SEC_NORMAL,
     199                                          Ci.nsIContentPolicy.TYPE_OTHER);
    196200        var input=channel.open();
    197201        scriptableStream.init(input);
Note: See TracChangeset for help on using the changeset viewer.