[Exception... "Could not convert JavaScript" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"

What the heck is..

uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMHTMLDivElement.appendChild]” nsresult: “0×80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)” location: “JS frame :: PATH_TO_MY_JAVASCRIPT_FILE :: THE_METHOD_NAME :: line #” data: no]

For me it was just an appendChild() that was causing the problems. You can always try the innerHTML+= way if all else fails ;)


Share This Article

Related Posts

Comments

  1. ??????? December 4, 2010

    The same problem

  2. dali June 24, 2011

    same ! FFS

  3. Bubuletz July 7, 2011

    got this too, but after I looked more carefully I noticed the problem. the code was:

    var a = document.createElement(“a”);
    a.appendChild(‘hello world’);

    someDiv.appendChild(a);

    Problem is at line 2. The correct way is:
    a.appendChild(document.createTextNode(‘hello world’));

    • Andrew July 7, 2011

      Thanks for your comment on this issue!

      As you have noticed a string is not a valid DOM element and should rather be used within an actual element like the TextNode you instantiated it on.

Trackbacks

There are no trackbacks on this entry.

Add a Comment

Required

Required

Optional

Latest Domains

1. weebly.com
(1 day ago)
2. whpromotions.co.uk
(1 day ago)
3. adsl24.co.uk
(1 day ago)
4. youryoungmodels.net
(1 day ago)
5. enom.com
(1 day ago)
6. dynect.net
(1 day ago)
7. websitewelcome.com
(1 day ago)
8. hostgator.com
(1 day ago)
9. uploading.com
(2 days ago)
10. soccernetghana.com
(2 days ago)

Services

PHP MySQL Apache Flash Air Java C++ Python