This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16335 - undefined attribute values
Summary: undefined attribute values
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL: http://lists.w3.org/Archives/Public/w...
Whiteboard:
Keywords: LC, needsReview
Depends on:
Blocks:
 
Reported: 2012-03-12 20:59 UTC by Travis Leithead [MSFT]
Modified: 2012-05-05 19:08 UTC (History)
4 users (show)

See Also:


Attachments

Description Travis Leithead [MSFT] 2012-03-12 20:59:42 UTC
PORTING from TRACKER, ISSUE-186:
[see http://lists.w3.org/Archives/Public/www-dom/2011JanMar/0066.html]

The result of getting attributes on an event object e created through

   var e = document.createEvent("Event")

appears to be completely undefined. What does eventPhase return, what does  
bubbles return, etc? Also after dispatching of an event is finished it is  
unclear what e.g. eventPhase and currentTarget ought to return. DOM Core  
attempts to cover this in detail.
Comment 1 Travis Leithead [MSFT] 2012-04-30 23:05:52 UTC
Working on adding "un-initialized values" to all the attributes, in addition to the "after dispatch" values of various attributes.
Comment 2 Travis Leithead [MSFT] 2012-04-30 23:12:29 UTC
Note: 3/5 browsers agree that the uninitialized value of eventPhase should be 0 (not AT_TARGET as described in DOM4). Of the other two non-agreeing browsers, they don't agree with each other. I think I'll stick with 0.
Comment 3 Anne 2012-04-30 23:18:42 UTC
If you keep eventPhase with value 0 you'll have to invent a constant for it too. We have no exceptions to that rule thus far. I thought adding a constant would be a greater change than defining the default value, but I'm happy to add a constant.
Comment 4 Travis Leithead [MSFT] 2012-05-02 16:11:56 UTC
(In reply to comment #3)
> If you keep eventPhase with value 0 you'll have to invent a constant for it
> too. We have no exceptions to that rule thus far. I thought adding a constant
> would be a greater change than defining the default value, but I'm happy to add
> a constant.

I'm thinking that a constant would be the easiest way to align the implementations. I checked HTML5 + all the WebApps specs looking for a suitable existing constant--the closest match was "NONE" from HTMLTrackElement. ("UNSENT" from XHR could also be used. There's also a value of "uninitialized" for the effectAllowed of DataTransfer, which is a string value (not a constant).

So, I think I'll just stick with UNINITIALIZED unless anyone objects.
Comment 5 Anne 2012-05-02 16:30:19 UTC
I think I prefer NONE as UNINITIALIZED is hard to spell. But up to you.

Just for the record. Currently Safari/Chrome/IE do 0, Firefox 2, and Opera 1, right?
Comment 6 Travis Leithead [MSFT] 2012-05-02 16:42:34 UTC
(In reply to comment #5)
> I think I prefer NONE as UNINITIALIZED is hard to spell. But up to you.
> 
> Just for the record. Currently Safari/Chrome/IE do 0, Firefox 2, and Opera 1,
> right?

No objection on NONE here--it also works well, since the eventPhase value goes back to 0 after dispatch in Safari/Chrome/IE and at that point it's initialized but in none of the other defined phases, so NONE works better :)

And yes, those are the current implementation values for eventPhase.
Comment 7 Anne 2012-05-02 18:43:39 UTC
Updated DOM4: http://dvcs.w3.org/hg/domcore/rev/98a9587a515c
Comment 8 Anne 2012-05-02 18:52:43 UTC
Filed bugs. Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=751286 WebKit: https://bugs.webkit.org/show_bug.cgi?id=85397 Opera: CORE-46127
Comment 9 Travis Leithead [MSFT] 2012-05-02 22:34:17 UTC
DOM3 Events spec now updated with these changes.
Comment 10 Ms2ger 2012-05-05 19:08:45 UTC
Added a test: http://dvcs.w3.org/hg/webapps/rev/f7745b53fc02