Re: [pointerevents] setPointerCapture should say something about iframes

I suppose the reason the spec doesn't say this is because there isn't 
any specialized limitations that I'm aware of.  This happens to work 
because:

1. the API requires it be called while the pointer is down.
2. the API is called off an element, which means you have to have 
access to that element to call it. This means the same-origin policy 
applies.
3. the target property is fixed for the events once you set capture. 
This means it can never be a reference to an element, say, from 
another document than the capture target node. This also means that 
the event properties always refer to the same document (the target 
node's doc).

So:
* Yes, you can capture events while you drag out of one document onto 
another. But that's OK!
* Yes, you can delegate the capture to an ancestor frame provided you 
have access to the API (see # 2).
* Yes, you can steal input from another frame. This is variant of the 
above point. Again, SOP applies given # 2.

I think, perhaps, we could clarify that when capture is set then 
document-relative properties (e.g. pageX, pageY) continue to refer to 
the owner document of the capture target node. Technically, these 
properties already say they refer to event.target's doc, but it could 
be made explicit for clarity.

Do you agree with this behavior? Is there more clarification 
(normative or non-normative) you think we should add? 



-- 
GitHub Notif of comment by jacobrossi
See 
https://github.com/w3c/pointerevents/issues/16#issuecomment-115081830

Received on Thursday, 25 June 2015 02:51:17 UTC