#780 closed bug (fixed)
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
Change History (4)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Component: | ajax → core |
---|---|
Milestone: | 1.1a → 1.1 |
Version: | → 1.1 |
Fixed in SVN rev 1009.
comment:3 follow-up: 4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Replying to 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;
});
Sorry, not AJAX; core probably?