Re: disabled attribute on SVGStyleElement

On 5/19/11 5:32 PM, Rob Buis wrote:
> Before implementing this, is this a valid bug report? A quick test on
> Opera and FF to query the disabled property on the style element
> returned 'undefined'.

Uh... how did you test?

The current state of implementation in Gecko is that we do exactly what 
HTML, DOM, and SVG specs say:

1)  HTMLStyleElement.prototype has a property called "disabled" in the 
DOM.  This can be assigned to (to enable or disable the stylesheet) and 
read from to get the current enabled/disabled state.

2)  The "disabled" content attribute on the <html:style> element does 
absolutely nothing.  In other words <html:style disabled> is NOT a 
disabled stylesheet.

3)  There is no "disabled" content attribute on <svg:style> or 
"disabled" property on SVGStyleElement.prototype.

Note that in general SVGStyleElement has a pretty different API from 
HTMLStyleElement; the only things they really share are "type" and "media".

I wouldn't object to converging them somewhat; that would mean adding 
.disabled to SVGStyleElement.prototype, adding .title to 
HTMLStyleElement.prototype (and HTMLLinkElement.prototype while we're 
here?), and doing I don't know what with .xmlspace on 
SVGStyleElement.prototype....

-Boris

Received on Friday, 20 May 2011 01:20:27 UTC