Skip to main content

Bug Tracker

Side navigation

#2646 closed bug (wontfix)

Opened April 03, 2008 12:59PM UTC

Closed May 16, 2008 03:27AM UTC

Exception in curCSS, when called with textnodes...

Reported by: m_abs Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

I get an uncut exception from the curCSS function in firefox under ubuntu 7.10.

Here is an example for code that gives that exception

$( "<b>TODO</b>: load this view<br /><input type='button' class='button' value='Close' onclick='alert( \\"hallo\\" );' />" ).appendTo( document.body ).show( );

I think it happens because the ": load this view" part from my string, becomes a textnode and apparently getComputedStyle doesn't work with that.

I tried adding a try-catch around the line

var getComputedStyle = document.defaultView.getComputedStyle( elem, null );

in which I alerted the nodeName (was "#text") and the nodeValue (was ": load this view");

Maybe it would be a good idea to do some type checking.

Attachments (0)
Change History (1)

Changed May 16, 2008 03:27AM UTC by flesler comment:1

resolution: → wontfix
status: newclosed

In previous tickets, the reply was "The string passed to $() must be valid html, as in, wrapped with nodes"

So I think this is just invalid html.

I'll close for now, feel free to reopen if you have something to say.