Element.setCapture() & Document.releaseCapture()

258 views
Skip to first unread message

James Churchman

unread,
Mar 15, 2016, 9:08:29 PM3/15/16
to Dart Web Development
It seems not possible to call :

Element.setCapture()

or Document.releaseCapture()


.. In dart. These are quite useful as they allow mouse capture outside of the DOM node its self when the mouse moves, and tho this can be done by adding/removing from the window object this can cause extra text selection and more etc... 

On a related note is there any good way ( in dart ) of unifying mouse & touch events .. a bit like the PointerEvent https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent spec but with support for all modern browsers? 

James Churchman

unread,
Mar 17, 2016, 9:36:48 AM3/17/16
to Dart Web Development
anyone? shall i add this as a bug for dart ? JC

Alan Knight

unread,
Mar 17, 2016, 2:25:29 PM3/17/16
to Dart Web Development
Do add a bug. We're updating the version of web IDL that we generate the library from in 1.16, so you could check if it's there already.

We haven't added anything of our own for unifying mouse and touch events lately. So unless it's become standard, or at least been added to Chrome, we don't have anything built in. Someone might have built something in a package, but I'm not aware of it.

--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at https://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/04d25ab4-bb00-4e73-a935-98d28bff03a0%40dartlang.org.

Don Olmstead

unread,
Mar 17, 2016, 4:16:28 PM3/17/16
to w...@dartlang.org
Is this a bug? I don't see it being available outside of Firefox. I also don't see a specification.

James Churchman

unread,
Mar 17, 2016, 6:03:50 PM3/17/16
to Dart Web Development
Hmm interesting .. reading here it is non standard, tho has been requested & implemented in IE first and then Firefox second, not blink/webkit

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14600

And here :

https://bugs.chromium.org/p/chromium/issues/detail?id=246536

That it was not implemented due to the upcoming pointer events, then pointer events not implemented either !

Don Olmstead

unread,
Mar 17, 2016, 6:24:03 PM3/17/16
to w...@dartlang.org
If you need it now you can just write a JS interop around it but as noted its not going to work in Blink or WebKit

James Churchman

unread,
Mar 17, 2016, 6:41:53 PM3/17/16
to Dart Web Development
yes indeed .. i did not realise it was only in IE + Gecko! Will just do the traditional window fallback. Many thanks!
Reply all
Reply to author
Forward
0 new messages