FF3 error when evaluating a cross domain XPath

andywatts <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <[email protected]>
Hi,

Given a HTML document with frames from two different domains.
I am able to evaluate XPaths across domains in FF2, but FF3 is
throwing an error.

function crossFrameDomainXpath() {
  // Ask for privileges necessary to access other domain's content.
 
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");

  // Get document element for the frame with external content.
  var d = top.frames[1].document;

  // evaluate XPath using second frame's document context.
 d.evaluate("//h1/text()", d, null, XPathResult.ANY_TYPE, null);
}

The error I'm getting is
[Exception... "Component returned failure code: 0x80070057
(NS_ERROR_ILLEGAL_VALUE) nsIDOMXPathEvaluator.evaluate" nsresult:
"0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame
http://localhost:3000/alp.html
crossFrameDomainXpath :: line 7" data: no]

I have codebase_principal_support enabled in lieu of signing the
script.
I have confirmed the error on a profile with no extensions, as well as
on Ubuntu64 and Vista64.

I'd greatly appreciate any advice regarding this error.

Andy Watts
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.