Re: cloneNode in a xpcom component failed

Smaug <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <[email protected]>
On 11/28/08 9:59 PM, Smaug wrote:
> On 11/28/08 1:34 PM, Sylvain Spinelli wrote:
>> Hi,
>>
>> Context : 1.9.1 recent build, windows
>>
>> // In a JS component, I load a DOM (from chrome://)
>> var vXhrComp = Components.classes["@mozilla.org/xmlextras/
>> xmlhttprequest;1"];
>> var vReq = vXhrComp.createInstance
>> (Components.interfaces.nsIXMLHttpRequest);
>> vReq.open("GET", "chrome://mychrome/content/myFile.xml", false);
>> vReq.send(null);
>> var vXml = vReq.responseXML;
>>
>> //I want to "backup" my dom
>> var vXmlBackup = vXml.cloneNode(true);
>>
>> The cloneNode failed : Security Error: Content at moz-nullprincipal:
>> {c0db3ee1-d7c3-47e4-b6d9-0a08830f15c9} may not load or link to //
>> chrome://mychrome/content/myFile.xml.
And is it really .cloneNode which causes the security error, not 
XMLHttpRequest? Well explain this all in the bug report and please try
to provide a *minimal* testcase.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.