Summary: | DOM 3 Event, Implement MouseEvent buttons member | ||
---|---|---|---|
Product: | WebKit | Reporter: | Brandon Andrews <sirisian> |
Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ap, Hironori.Fujii, syoichi |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-MouseEvent-buttons |
Description
Brandon Andrews
2012-03-21 18:04:35 PDT
Here's an example that complies with the DOM 3 events http://sirisian.com/javascript/dom3buttons.html source: <!doctype html> <html lang="en"> <head> <title>Dom 3 Buttons</title> <script type="text/javascript"> "use strict"; window.onload = function() { window.addEventListener("mousedown", function(e) { e.preventDefault(); console.log(e.buttons); }, false); window.addEventListener("mouseup", function(e) { e.preventDefault(); console.log(e.buttons); }, false); } </script> </head> <body> </body> </html> The information for implementing it is in the spec: http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-MouseEvent-buttons Currently it's undefined in webkit. *** This bug has been marked as a duplicate of bug 178214 *** |