Processing user input events in a web browser
First Claim
1. A method, comprising:
- in response to a user event received for a target element in a webpage, the webpage being received and currently rendered for display by a device, the device being provided with a browser engine configured with a default handling action for the received user event,concurrently dispatching the user event for processing in a main thread and a secondary thread;
processing the user event in the main thread using an event handler associated with said target element and received with the webpage by the device;
processing the user event in the secondary thread using the default handling action at least partially concurrently with the processing of the user event in the main thread;
while the processing of the user event in the main thread and the processing of the user event in the secondary thread are executing concurrently, the main thread determining that the default handling action is to be prevented for the user event;
the main thread notifying the secondary thread to terminate; and
updating the current rendering of the webpage according to the processing completed by that first one of the main thread.
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
17 Claims
-
1. A method, comprising:
-
in response to a user event received for a target element in a webpage, the webpage being received and currently rendered for display by a device, the device being provided with a browser engine configured with a default handling action for the received user event, concurrently dispatching the user event for processing in a main thread and a secondary thread; processing the user event in the main thread using an event handler associated with said target element and received with the webpage by the device; processing the user event in the secondary thread using the default handling action at least partially concurrently with the processing of the user event in the main thread; while the processing of the user event in the main thread and the processing of the user event in the secondary thread are executing concurrently, the main thread determining that the default handling action is to be prevented for the user event; the main thread notifying the secondary thread to terminate; and updating the current rendering of the webpage according to the processing completed by that first one of the main thread. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A device, including:
-
a display; at least one communication subsystem; a browser engine; at least one processor in communication with the display and the at least one communication subsystem, the at least one processor being configured to execute the browser engine and to enable; in response to a user event received for a target element in a webpage, the webpage being received using the at least one communication subsystem and currently rendered for display by the computing device, the browser engine being configured with a default handling action for the received user event, concurrently dispatching the user event for processing in a main thread and a secondary thread; processing the user event in the main thread using an event handler associated with said target element and received with the webpage by the computing device; processing the user event in the secondary thread using the default handling action at least partially concurrently with the processing of the user event in the main thread; while the processing of the user event in the main thread and the processing of the user event in the secondary thread are executing concurrently, the main thread determining that the default handling action is to be prevented for the user event; the main thread notifying the secondary thread to terminate; and updating the current rendering of the webpage according to the processing completed by that first one of the main thread. - View Dependent Claims (15, 16, 17)
-
Specification