Folks -
Not sure this is relevant, but I'm tracking/contributing to the
following two bugs around 'resize' events:
One for Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=227495
and one for Webkit:
https://bugs.webkit.org/show_bug.cgi?id=17969
The reason I point these out is that, in both cases, implementors are
asking for better definitions of how these events should work (i.e.
when they should fire, etc. etc.) Absent any formal definition, the
intent for both camps is to just 'write up' how IE handles onresize at
the 'element' level and implement that (not sure if Opera supports
onresize on elements, sorry...). The important point here is that,
since 'resize' is an Element-level event, it should operate if CSS
changes modify the size of the element, not just when the window
resizes.
On a related issue, what that leads to (i.e. 'resize' events getting
fired upon CSS rule application) in my mind is the definition by this
group of one or more events that would get fired when an element's
computed (not necessarily inline) CSS value for any particular
property gets changed. In IE, you can observe changes of any property
of an element (including style changes) via the 'onpropertychange'
event and then use currentStyle (W3 equivalent: getComputedStyle()) to
get the new value.
So something like a 'CSSValueChanged' event that can be attached to an
Element node.
Note that this is not the same as observing 'DOMAttrModified' on an
element's 'style' attribute, nor should it be, IMO.
Any thoughts?
Cheers,
- Bill
On Jun 17, 2009, at 4:06 AM, Anne van Kesteren wrote:
On Wed, 17 Jun 2009 08:56:43 +0200, Ian Hickson <i...@hixie.ch> wrote:
As mentioned on IRC, it would be cool if the CSSOM spec could
define when
to fire 'scroll' and 'resize' events.
If there's a particular place I should log this so that whoever takes
over that spec doesn't lose this feedback, let me know.
For people following this thread: This is now logged in the CSS WG
issue tracker by Ian as that is the group working on the CSSOM.
--
Anne van Kesteren
http://annevankesteren.nl/