Closed
Bug 709469
Opened 13 years ago
Closed 6 years ago
[Gonk] Consider postMessage() instead of setTimeout(..., 0) to dispatch click events
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: philikon, Unassigned)
References
Details
Currently touch.js uses setTimeout(..., 0) to ensure click event handlers don't block the click event dispatch. However, there's a delay of a few ms associated with it. gal suggested in bug 708538 to use postMessage instead. (Note that postMessage can be pretty allocation heavy since it creates new event objects and marshals the data that's transferred.)
Comment 1•13 years ago
|
||
Alternately would be use the setImmediate proposed by IE guys. https://developer.mozilla.org/en/DOM/window.setImmediate Since these no setImmediate in Gecko, we can use this *and* then shim it. I have code to recycle from that does this.
Comment 2•13 years ago
|
||
This is chrome land code, so we really don't wont shims there. postMessage() seems to be the way to go.
Comment 3•13 years ago
|
||
What about the schedule API that is proposed in bug 692420?
Reporter | ||
Comment 4•13 years ago
|
||
(In reply to Vivien Nicolas (:vingtetun) from comment #3) > What about the schedule API that is proposed in bug 692420? Sure. But touch.js is chrome code, right? Just do Services.tm.currentThread.dispatch(func, Ci.nsIThread.DISPATCH_NORMAL);
Comment 5•6 years ago
|
||
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•