Processing user input events in a web browser
First Claim
1. A method of processing user events on a plurality of threads, the method comprising:
- receiving a user event at a touchscreen of an electronic device curing display of a document by the touchscreen;
dispatching the user event to a main thread of a web browser and to a secondary thread of the web browser, wherein the main thread of the web browser is configured to process user events and non-user events;
after a predetermined period of time has elapsed following the start of processing of the user event by the main thread or dispatch of the user event to the main thread, processing the user event by the secondary thread, wherein the secondary thread is configured to process the user event using a default handling method;
upon completing processing of the user event by the main thread, updating the display of the document according to the processing completed by the main thread; and
notifying the second thread to terminate by the main thread, in response to the completion of the processing.
6 Assignments
0 Petitions
Accused Products
Abstract
A method and computing device are provided for processing user events received via a user interface, such as a touchscreen, in multiple threads. When a user event is received for a target element in a webpage, the user event is dispatched to both a main browser thread and a secondary thread. The secondary thread processes user events in accordance with established default actions defined within the browser, while the main thread processes the user events in accordance with any event handlers defined for that target element. The main thread processing may be delayed by other interleaved task, and the secondary thread may be given priority over the main thread. When the secondary thread completes processing, an updated webpage is displayed. When the main thread subsequently completes processing, its updated rendering of the webpage is displayed. The secondary thread thus provides an early user interface response to the user event.
-
Citations
16 Claims
-
1. A method of processing user events on a plurality of threads, the method comprising:
-
receiving a user event at a touchscreen of an electronic device curing display of a document by the touchscreen; dispatching the user event to a main thread of a web browser and to a secondary thread of the web browser, wherein the main thread of the web browser is configured to process user events and non-user events; after a predetermined period of time has elapsed following the start of processing of the user event by the main thread or dispatch of the user event to the main thread, processing the user event by the secondary thread, wherein the secondary thread is configured to process the user event using a default handling method; upon completing processing of the user event by the main thread, updating the display of the document according to the processing completed by the main thread; and notifying the second thread to terminate by the main thread, in response to the completion of the processing. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An electronic device comprising:
-
a touchscreen; at least one processor in communication with the touchscreen, the at least one processor being configured to; receive a user event at the touchscreen of the electronic device during display of a document by the touchscreen; dispatch the user event to a main thread of a web browser and to a secondary thread of the web browser, wherein the main thread of the web browser configured to process user events and non-user events; after a predetermined period of time has elapsed following the start of processing of the user event by the main thread or dispatch of the user event for to the main thread of the web browser, process the user event by the secondary thread, wherein the secondary thread is configured to process the user event using a default handling method; upon completing processing of the user event by the main thread, update the display of the document according to the processing completed by the main thread; and notify the second thread to terminate by the main thread, in response to the completion of the processing. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A non-transitory computer readable storage medium comprising processor-executable instructions which, when executed, configure a processor to:
-
receive a user event at a touchscreen of an electronic device during display of a document by the touchscreen; dispatch the user event to a main thread of a web browser and to a secondary thread of the web browser, wherein the main thread of the web browser configured to process user events and non-user events; after a predetermined period of time has elapsed following the start of processing of the user event by the main thread or dispatch of the user event to the main thread of the web browser, process the user event by the secondary thread, wherein the secondary thread is configured to process the user event using a default handling method; upon completing processing of the user event by the main thread, update the display of the document according to the processing completed by the main thread; and notify the second thread to terminate by the main thread, in response to the completion of the processing.
-
Specification