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 25359 - Use [Unforgeable] and [NewObject] annotations in D3E
Summary: Use [Unforgeable] and [NewObject] annotations in D3E
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 22:55 UTC by Gary Kacmarcik
Modified: 2014-04-28 23:06 UTC (History)
3 users (show)

See Also:


Attachments

Description Gary Kacmarcik 2014-04-15 22:55:53 UTC
(originally from 25295)

https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#idl-def-Event
IDL for isTrusted has the form: readonly attribute boolean isTrusted;

http://dom.spec.whatwg.org/#interface-event
In new DOM we have additional extended attribute: [Unforgeable] readonly attribute boolean isTrusted;

It's important and should be add.

Similar situation (but less meaning):

interface DocumentEvent {
    Event createEvent (DOMString eventInterface);
};

change to:

interface DocumentEvent {
    [NewObject] Event createEvent (DOMString eventInterface);
};
Comment 1 Gary Kacmarcik 2014-04-16 00:24:02 UTC
We need to compare D3E with D4 and make sure that the IDLs match for all attributes and methods that are common.
Comment 2 Travis Leithead [MSFT] 2014-04-16 00:42:21 UTC
The only other difference I see is the use of the [Exposed] attribute:

[Exposed=Window,Worker] to the Event, CustomEvent, and EventTarget interfaces

But, since Exposed is only defined in WebIDL second edition, I think we're OK not using it at the moment.
Comment 3 Anne 2014-04-16 15:00:17 UTC
That sounds ridiculous and will cause confusion. Can we please just stop the pretense that DOM in general has not evolved past Level 3?

Doing DOM Level 3 Events "quickly" never happened. Let's instead aim for doing it correctly.
Comment 4 Travis Leithead [MSFT] 2014-04-16 17:24:22 UTC
Well, if we agree with Anne's comments, then [Exposed] is for altering the default "exposure" of the interface outside of the "primary global interface" (http://heycam.github.io/webidl/#Exposed). The default as I understand it, is the Window object (vs. a worker object).

So besides just harmonizing with what's in DOM4, we'd need to review all of our interfaces to see which ones we define that might need exposure to Web workers. If they do need to be exposed, then we don't need to add the [Exposed] extended attribute, since the default will suffice.

Here's the list and my default recommendations:

* UIEvent - default exposure
* FocusEvent - default exposure
* MouseEvent - default exposure
* WheelEvent - default exposure
* InputEvent - default exposure
* KeyboardEvent - default exposure
* CompositionEvent - default exposure
* MutationEvent (legacy) - default exposure

So, in summary, if this list is acceptable, then Exposed is only needed for the events which are already defined to be exposed to workers in Dom4.
Comment 5 Anne 2014-04-16 19:35:35 UTC
If you acknowledge the DOM is further ahead than Level 3, there's no need to duplicate its contents in DOM Level 3 Events. That is what is confusing.
Comment 6 Travis Leithead [MSFT] 2014-04-28 23:06:17 UTC
I've not committed these IDL changes to the latest editor's draft.

https://dvcs.w3.org/hg/dom3events/rev/81dcf597c71b