These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:03 pm Advanced search

Event Capturing Precendence

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Event Capturing Precendence

Postby JAB Creations » Sat Jun 16, 2012 1:01 pm

My latest project includes work with object elements. One of the things I've noticed is that it is difficult to have events trigger with object elements because in all browsers except IE in some circumstances the object (pretty much always Flash) receives the event though does not pass it to the site. Since object elements are often content embeded by third party sites this gives third parties too much control over how events are handled and prevents normal intuitive design from being programmed by the first party. I think it would be exceptionally better to have events always default to the first party and then by choice of the first party be either allowed or denied to the third party.

I don't follow up with the relations between DOM4 and HTML5 so I'm not exactly sure who to approach with this?
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Event Capturing Precendence

Postby zcorpan » Mon Jun 18, 2012 7:56 am

Do you mean like 'click' events when the user clicks in the Flash plugin area?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: Event Capturing Precendence

Postby JAB Creations » Mon Jun 18, 2012 2:44 pm

Events yes, the dragstart event specifically if I'm not mistaken. In general I've noticed that events are handed off by the browser to the third party instead of the first party like it should. Offhand I'm not against the third party domain having access to events though I think it would be desirable to prevent it as the first party. There also isn't any way to actually cycle through the events associated with an object and a specific event (e.g. five anonymous functions assigned to an onclick event) making the removeEventListener pretty much useless.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Event Capturing Precendence

Postby zcorpan » Wed Jun 20, 2012 7:18 am

OK. Are you saying that IE makes the events available to the embedder?

What is the use case for making the events available to the embedder?

What is the use case for denying the plugin the events?

As for removeEventListener, you just need to keep track of the listeners you add if you later want to remove them.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: Event Capturing Precendence

Postby JAB Creations » Wed Jun 20, 2012 6:01 pm

It appears that IE gives the events precedence to the first party domain instead of the second domain in which the object is loaded from, I presume this since we're talking about the domain second domain (YouTube).

The case for events being accessed like every other element? For all the reasons that all other elements have access to those events. Additionally I think if the first domain desires it the events could (not should nor should not) be passed on to the second domain. In example when implementing drag and drop on a project I am able to drag and drop images and blockquotes to arrange their order whereas with object elements I am not even when giving padding (as the events seem to only trigger directly in the content rendering and not the padding/border/margin).

To deny the second party access (as an neutral option) if the second party triggers known and undesirable behavior (such as triggering fullscreen onclick or conflicting with the first domain's events) to allow desired operation by the user.

Also keep in mind that Flash specifically (I'm not certain about other plugins) has the ability to execute JavaScript commands. The Music Player Flash plugin on my site does this.

Writing a script to track event listeners makes absolutely no sense. It is possible to for loop the properties of pretty much everything except for event listeners. I can't imagine being one of the first people to mention this?
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Event Capturing Precendence

Postby ainwee » Fri Mar 27, 2015 10:56 am

Since object elements are often content embeded by third party sites this gives third parties too much control over how events are handled and prevents normal intuitive design from being programmed by the first party. I think it would be exceptionally better to have events always default to the first party and then by choice of the first party be either allowed or denied to the third party.????
ainwee
<h6>
 
Posts: 1
Joined: Fri Mar 27, 2015 10:23 am


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 1 guest