Erik Arvidsson wrote:
> This is a bit confusing.
> 
> When talking about capture according to the W3C DOM2 Events capture means
> the way the event propagates through the DOM content model.
> 
> When talking about it according to the way MS uses it in IE using
> setCapture, releasCapture and onlosecapture it is a way of tracking mouse
> events. Once setCapture is called on an element all mouse events are
> dispatched from that element. This allows you to track mouse movement over
> iframes, objects and even outside the browser window.
> 
You may use addEventListener and removeEventListener to track cursor movement
for the HTMLHtmlElement and HTMLBodyElement. The mouse events for the object's
children should propagate to the parent objects. I do not think the DOM
specification makes any provision for tracking user actions outside of
HTML documents (for obvious cross platform and security reasons). You may,
however, use Mozilla XPCOM APIs for handling drag and drop from within a
user-installed chrome componenet. The APIs, however, is not accessible from
within a HTML document.

> The question still remains (and I'd like an answer to it as well). How do I
> track mousemove events (for example) when the mouse pointer is over an
> iframe/object or outside the browser window. This is needed when doing drag
> and drop.

use AddEventListener to attach a mouse event handler to the body or HTML objects.
For tracking mouse pointer outside the browser window, sorry, no can't do.

Please refer to Microsoft documentation and W3C specifications on DOM events.

This is a Mozilla developer newsgroup for layout and rendering discussion.
Web developer and end user questions should be redirect to a end-user
newsgroup (see my last post).
> 
> erik
> 
> 
> "dwx" <[EMAIL PROTECTED]> wrote in message
> aksa1r$[EMAIL PROTECTED]">news:aksa1r$[EMAIL PROTECTED]...
> 
> http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget-addEv
> entListener


Reply via email to