Bug 15338 - Remove the initAnimationEvent method
Remove the initAnimationEvent method
Status: RESOLVED FIXED
Product: CSS
Classification: Unclassified
Component: Animations
unspecified
PC All
: P2 normal
: ---
Assigned To: Dean Jackson
This bug has no owner yet - up for the taking
[easy]
:
: 15247 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-26 06:05 UTC by Dominic Cooney
Modified: 2012-10-02 00:24 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Cooney 2011-12-26 06:05:51 UTC
The new pattern for programmatic event creation adopted eg by DOM4, HTML5, etc. is to define constructors for events instead of init*Event methods.

For example, ProgressEvent is defined in this new style: <http://www.w3.org/TR/2011/WD-progress-events-20110809/#interface-progressevent>

The AnimationEvent should have a constructor and the initAnimationEvent method should be removed.
Comment 1 Simon Fraser 2012-02-08 14:06:00 UTC
*** Bug 15247 has been marked as a duplicate of this bug. ***
Comment 3 Sylvain Galineau 2012-04-10 20:07:27 UTC
This sounds reasonable though there seeems to be interoperable support for the init*Event() methods. As such I'd like to either:
a. Postpone the new pattern to the next level
b. Specify both (maybe marking the init* pattern as deprecated?)
Comment 4 Dominic Cooney 2012-04-12 04:13:25 UTC
(In reply to comment #3)
> This sounds reasonable though there seeems to be interoperable support for the
> init*Event() methods.

initAnimationEvent is vendor-prefixed in Safari 5.1, not in WebKit nightly, and not implemented in Chrome.

> As such I'd like to either:
> a. Postpone the new pattern to the next level

What does the next level mean? CSS4 Animations?

> b. Specify both (maybe marking the init* pattern as deprecated?)
Comment 5 Sylvain Galineau 2012-04-12 16:39:12 UTC
The method is supported by Firefox and IE10 as well as Safari. 

Yes, next Level -> next version of this module. (Whether that should be 4 or 2 is for another day).
Comment 6 Dominic Cooney 2012-04-13 01:05:15 UTC
(In reply to comment #5)
> The method is supported by Firefox and IE10 as well as Safari. 

It is vendor prefixed in Safari and I think it is gone in WebKit ToT.

> Yes, next Level -> next version of this module. (Whether that should be 4 or 2
> is for another day).

It seems odd to introduce and deprecate an API in the first version of the spec.
Comment 7 Sylvain Galineau 2012-04-13 01:14:00 UTC
That's still three browsers supporting it. I don't think it's that odd for a spec to reflect the state of implementations when there already is content built around it. Though to be completely honest I can't point to content that references this specific method so it may be entirely safe to remove it.
Comment 8 Dominic Cooney 2012-04-13 08:33:50 UTC
(In reply to comment #7)
> Though to be completely honest I can't point to content that
> references this specific method so it may be entirely safe to remove it.

That was the conclusion WebKit came to when it did a clean-up of a number of init*Event methods.
Comment 9 Sylvain Galineau 2012-10-02 00:24:23 UTC
Note: as suggested by Dominic, the fix follows the template of ProgressEvent. As this includes links to DOM4 ED we may have to tighten this up for LC/CR.