Skip to main content

Bug Tracker

Side navigation

#780 closed bug (fixed)

Opened January 11, 2007 01:06PM UTC

Closed January 11, 2007 05:25PM UTC

Last modified January 12, 2012 03:14PM UTC

NS_ERROR_XPC_BAD_CONVERT_JS

Reported by: Jason Owned by:
Priority: major Milestone: 1.1
Component: core Version: 1.1
Keywords: Cc:
Blocked by: Blocking:
Description
Error: Could not convert JavaScript argument arg 0 [nsIDOMHTMLDivElement.appendChild] = NS_ERROR_XPC_BAD_CONVERT_JS
Source file: (jquery-1.1b.js)
Line: 158

Using code:

$(document).ready( function(){
$("#test").html("");
alert('this will not show');
});

test is just a div, but this error is displayed in the Firefox console. It still seems to actually work by setting it to "", but no code after the .html("") will work.

This is 1.1b on Firefox 1.5 on Windows XP

Attachments (0)
Change History (4)

Changed January 11, 2007 01:07PM UTC by Jason comment:1

Sorry, not AJAX; core probably?

Changed January 11, 2007 05:24PM UTC by john comment:2

component: ajaxcore
milestone: 1.1a1.1
version: → 1.1

Fixed in SVN rev 1009.

Changed January 11, 2007 05:25PM UTC by john comment:3

resolution: → fixed
status: newclosed

Changed January 12, 2012 03:14PM UTC by Nathaniel Layton comment:4

Replying to [comment:3 john]: I can reproduce this just FYI.

The work around I used was:

$('#id').html(someObj.stringProperty);/ /Original: doesn't work for some reason

$('#id')[0].innerHTML = someObj.stringProperty;/ /Work-Around: works ok

Though this is a jquery/NS error, it is rare and not worth fixing. Especially when the work around is so simple.

Note if you had multiple dom elements you could use the jquery each function and then innerHTML.

example:

$('.someClass').each(function(i, el){

el.innerHTML = someObj.stringProperty;

});