Open cvan opened 9 years ago
so if we can't use privileged Firefox internals, this is the hack to make it work (since getComputedStyle
won't work):
http://stackoverflow.com/a/12629050 http://stackoverflow.com/a/11495671
@kevingrandon: do you know how we would go about doing this in Gecko/extension land - to get those trusted events?
Not off the top of my head. Might we worth talking to some DOM guys to see if this is something we should build an API for?
supposedly we can add-ons can fire trusted events. we should just figure out how we can do that from an add-on in Horizon. should talk to DOM folks.
I don't know how I forgot, but Pointer Events are a thing.
and it looks like, when implemented, Pointer Events (bug 822898) will trigger :hover
on pointerenter
(and dismiss on pointerleave
), if I'm infering correctly from the spec. I'm not sure, but I'd assume that :active
also gets triggered correctly.
/cc @caseyyee check it out! :tada: now to just wait for platform support… (GD, IE 11!)
Looks like there are even r+'d patches for this work. For some reason the work has been at a standstill since. We'll want to call this out and see if we can get any traction on getting this going again.
see this conversation
if we were privileged to use
Components.utils
, we could use something likeaddPseduoClassLock
(which is what the DevTools uses to toggle:hover
,:active
states in the document).