nsIDOMDocument::CreateElement succeeds on UNIX and fails on WIN

Hi again,
I'm developing a plugin for Firefox, maybe you think its' aplugin
issue, but nope, it's an XPCOM issue, here is what is happening. At
the plugin initialisation , I want to add an iframe to the current
document, so
1) I get the document element :
nsIDOMWindow * domWindow;
NPN_GetValue(mInstance, NPNVDOMWindow,  NS_STATIC_CAST(nsIDOMWindow
**, &domWindow))==NPERR_NO_ERROR );
nsCOMPtr<nsIDOMDocument> domDocument;
domWindow->GetDocument(getter_AddRefs(domDocument));
2) then I create my nsIDOMElement:
nsCOMPtr<nsIDOMElement> iframe;
nsresult rv=domDocument->CreateElement(NS_LITERAL_STRING("IFRAME"),
getter_AddRefs(iframe));
There it fails on WIN, whereas on UNIX , no problem,And obviously on
Windows , no chance to know what kind of nsIError this is!!
Can somebody help?
Thanks.
Mac
0
Mac
11/19/2009 2:51:27 PM
mozilla.dev.tech.xpcom 1345 articles. 0 followers. Post Follow

1 Replies
1310 Views

Similar Articles

[PageSpeed] 32

On 19 nov, 15:51, Mac <meunierr...@gmail.com> wrote:
> Hi again,
> I'm developing a plugin for Firefox, maybe you think its' aplugin
> issue, but nope, it's an XPCOM issue, here is what is happening. At
> the plugin initialisation , I want to add an iframe to the current
> document, so
> 1) I get the document element :
> nsIDOMWindow * domWindow;
> NPN_GetValue(mInstance, NPNVDOMWindow, =A0NS_STATIC_CAST(nsIDOMWindow
> **, &domWindow))=3D=3DNPERR_NO_ERROR );
> nsCOMPtr<nsIDOMDocument> domDocument;
> domWindow->GetDocument(getter_AddRefs(domDocument));
> 2) then I create my nsIDOMElement:
> nsCOMPtr<nsIDOMElement> iframe;
> nsresult rv=3DdomDocument->CreateElement(NS_LITERAL_STRING("IFRAME"),
> getter_AddRefs(iframe));
> There it fails on WIN, whereas on UNIX , no problem,And obviously on
> Windows , no chance to know what kind of nsIError this is!!
 Oh I and I forgot to tell that the page on which the plugin is
working is an XML page (XHTML), myabe that'll help :)
Mac
0
Mac
11/20/2009 8:31:08 AM
Reply:

Similar Artilces:

Purpose of dev-tech-xpcom
What's the purpose of this list? I used to think it was about XPCOM itself, basically for questions about the code in xpcom/**. However, that doesn't seem to be how everyone else uses it. In fact, it seems to be about all coding questions that are somewhat Firefox- or XULRunner-related. Basically what the platform or extension lists are supposed to be. Should we, therefore, delete this list/newsgroup? As it is used, it is redundant. -christian -- All the world's a stage, And all the men and women merely players: They have their exits and their entrances...

the same xpcom interface called failed in javascript, but succeed in C++
I have a xpcom interface, named xpcomAccountBuddy. And the interface has a function named createConversation. I called it in js, xpcomAccountBuddy.createConversation(), it failed. But if called in C++, xpcomAccountBuddy->CreateConversation(), it succeed. Any suggestions? Thank you in advance. Very appreciated. DDD wrote: > Any suggestions? Yes. But you'll have to guess at them, just like we have to guess at what's failing for you. ;) -Boris P.S. Adding some indication of what failed would be a good idea. Reading http://www.chiark.greenend.org.uk/...

PB Dev vs PB EXE Soap fails/succeeds
PB 9.0.1, Build 7066 I saw someone else's posting about copying the DLLs from the Shared directory into the Working directory. This did indeed allow my Soap code to work from the IDE. Unfortunately, I don't like this as a solution. My path includes the Shared directory so the copy doesn't really make sense. I don't want to have to worry about having a dozen copies of these DLLs. Largely because I don't even know exactly which ones I need. Currently I have, EasySoap.dll ExPat.dll pbejbclient90.dll pbsoapclient90.dll PbSpPrxy90.dll pbwsdl90.dll pbwsd...

Merging dev-tech-layout into dev-platform
Today I found out that I had missed a post from David Baron on dev-tech-layout, because I had no idea that this list exists. I think dev-platform is a better place to have the conversation related to the layout module (people are already having discussions about other modules over there). Does anybody have any objections? Cheers, Ehsan ...

Merging dev-tech-layout into dev-platform
Today I found out that I had missed a post from David Baron on dev-tech-layout, because I had no idea that this list exists. I think dev-platform is a better place to have the conversation related to the layout module (people are already having discussions about other modules over there). Does anybody have any objections? Cheers, Ehsan ...

superreview granted: [Bug 298478] Downloads fail with "..could not be saved, because the source file could not be read" : [Attachment 187142] Make the win/unix hiddenwindow a blank chrome window, rev
Brendan Eich <brendan@mozilla.org> has granted Benjamin Smedberg [:bs] (formerly bsmedberg@covad.net) <benjamin@smedbergs.us>'s request for superreview: Bug 298478: Downloads fail with "..could not be saved, because the source file could not be read" https://bugzilla.mozilla.org/show_bug.cgi?id=298478 Attachment 187142: Make the win/unix hiddenwindow a blank chrome window, rev. 1 https://bugzilla.mozilla.org/attachment.cgi?id=187142&action=edit ------- Additional Comments from Brendan Eich <brendan@mozilla.org> sr=me provided there are no Ts re...

superreview requested: [Bug 298478] Downloads fail with "..could not be saved, because the source file could not be read" : [Attachment 187142] Make the win/unix hiddenwindow a blank chrome window, r
Benjamin Smedberg [:bs] (formerly bsmedberg@covad.net) <benjamin@smedbergs.us> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 298478: Downloads fail with "..could not be saved, because the source file could not be read" https://bugzilla.mozilla.org/show_bug.cgi?id=298478 Attachment 187142: Make the win/unix hiddenwindow a blank chrome window, rev. 1 https://bugzilla.mozilla.org/attachment.cgi?id=187142&action=edit ------- Additional Comments from Benjamin Smedberg [:bs] (formerly bsmedberg@covad.net) <benjamin@smedbergs.us> This...

Have migration knowledge... win, win, win!
Submit your Unicode Migration Stories for the Delphi and C++Builder Migration Best Practices Cookbook RAD Studio 2009 empowered you, the Delphi and C++Builder developer, to deliver first class, Unicode-enabled applications to your customers. While this important development is opening new markets for your software, in some cases it may have presented a challenge for some existing applications and development techniques, especially where code has included explicit assumptions about the size of strings. We want to aid those developers faced with the task of migrating existing a...

Have migration knowledge... win, win, win!
Submit your Unicode Migration Stories for the Delphi and C++Builder Migration Best Practices Cookbook RAD Studio 2009 empowered you, the Delphi and C++Builder developer, to deliver first class, Unicode-enabled applications to your customers. While this important development is opening new markets for your software, in some cases it may have presented a challenge for some existing applications and development techniques, especially where code has included explicit assumptions about the size of strings. We want to aid those developers faced with the task of migrating existing a...

NSS_Shutdown failed in XPCOM
Hi, all: Something occur but I do catch it, in RedHat9, Mozilla-1.6, XPCOM. I get nss from nss-3.9.tar.gz and nspr from nspr-4.4.1.tar.gz. Except this problem, my XPCOM is running quite well. { PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); NSS_Init(/root/.mozilla/default/1irinuae.slt); .. ..//open cert db and do something, ..//these are ok and finished. .. NSS_Shutdown();//failed, and mozilla enter logjam (???). PR_Cleanup();//not run to here yet. } Any help for me? Thanks and kindly regards. boise wrote: > in RedHat9, Mozilla-1.6, XPCOM. > I get n...

Did Dump Succeed or Fail?
Is there some way to tell that a dump succeeded, other than the "dump is complete" message put out in the log? I would like to have some sql that attempts the dump, and should it fail, do something (like output a message to the screen or something). How can this be accomplished? Here's an example of the type of logic I'd like, if possible: dump database MyDatabase if dumpfailed output message "Serious Problem!" go Any idea how to turn that into real code??? Thanks, Kurt Check the contents of @@error after the DUMP command. Example: ...

Build Succeeded, Publish Failed??
Hello,I'm having a weird problem here.  When I build my (File System) web site, it all goes fine (see output below), but when i try to publish it it fails with not so much error details (see output below).  It does give me an "Index was outside the bounds of the array." message, but this is a pretty large web site, it would take me a few weeks to go through everything, plus the build succeeds and i have been testing the web site for 2 weeks now and have not seen any errors or malfunctionning features.  Does anyone know how i could find out more on the error that&...

simple code succeeds in failing over and over again
Dear all, I have a dw with for instance 4 records on it , i insert a fifth , check modifiedcount() > 0 and then i do a dw_1.update(). Immediately after this is i want to show the number of records in this dw... I always end up having one record too less dw_1.InsertRow(0) //fill in the values If dw_1.Modifiedcount() > 0 then dw_1.update() end If messagebox("Testing number of records " , string(dw_1.RowCount()) When i close my window and reopen it , there are 5 records in my dw. Any help ? Info ? Suggestions ? TIA John ...

Succeed
Hi all, Few minutes ago I was finished first XPCOM test build in Delphi 7 so Object Pascal can be now listed with C++ and JScript as XPCom enabled language. Current status is XPCom called from XUL from XULRunner. XULRunner is started as host app so you can debug xpcom component right from IDE. I am looking forward for next development, now I am support just Int as parametr (string not supported now, pointers to DOM not tested now) source code will be published somewhere after while, stay tuned see ya Radek On Apr 9, 7:10 am, volt...@gmail.com wrote: > Hi all, ...

Web resources about - nsIDOMDocument::CreateElement succeeds on UNIX and fails on WIN - mozilla.dev.tech.xpcom

Resources last updated: 1/23/2016 8:40:41 AM