I trying to do application with embedded browser.
I'm using a mozctl object. This is easy to navigate browser to any existing
file. But I want to generate file content
dynamically. The easiest way is create a temporary file and navigate to it, but
this is not so good solution. I've found
that nsIWebBrowser which I have from IID_IMozControlBridge can be queried to
nsIWebBrowserStream, I can use methods
openStream/appendToStream/closeStream - this is super! But... there are some
problems with javascript, it fails in some
places, e.g. in "nsSidebar.js" file at:
this.searchService =
Components.classes[SEARCHSERVICE_CONTRACTID].getService(nsIBrowserSearchService);
the error is:
"ServiceManager::GetService returned failure code:" nsresult: "0x80570016
(NS_ERROR_XPC_GS_RETURNED_FAILURE)" location:
"JS frame :: file:///C:/temp/moz/mozilla/dist/bin/components/nsSidebar.js ::
nsSidebar :: line 83" data: no]
I tried to comment out these strings, but there are other errors appear during
my page loading, the error code is
NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN at XPC_WN_OnlyIWrite_PropertyStub. I tried
understand the code, but it's too
difficult for me... Maybe are there some security restrictions?
Is it possible use openStream/appendToStream/closeStream (or something likes
this) so that JavaScript will work well?
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom