Enabling web browser extensions to perform asynchronous blocking operations
The method allows web browser extensions to perform asynchronous blocking operations by configuring callback functions, enabling advanced functionalities such as data loss prevention and network request management, thereby enhancing their operational efficiency.
Patent Information
- Application Number
- JP2024534770
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-12-14
- Filing Date
- 2022-12-14
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Current web browser architectures do not allow browser extensions to perform asynchronous blocking operations, limiting their functionality in managing certain events.
A method is implemented to enable web browser extensions to perform asynchronous blocking operations by configuring an extension-provided callback function to execute after performing the blocking operation, using an indicator to determine asynchronous behavior, and allowing the web browser to call the extension-provided callback function only after authorization.
Enables web browser extensions to perform complex operations like data loss prevention, multi-factor authentication, and network request management asynchronously, enhancing their functionality and efficiency.
Smart Images

Figure 2024546131000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for enabling web browser extensions to perform asynchronous blocking operations. [Background technology]
[0002] A browser extension is a set of computer instructions provided to a web browser to provide the web browser with additional functionality, such as the ability to block advertisements and modify web page content. One way that web browsers accommodate browser extensions is by providing application programming interfaces (APIs) that allow the browser extension to monitor certain types of events, such as when the web browser receives a web page from the Internet, and take certain actions, such as blocking (preventing) the web page from being displayed by the web browser, if the browser extension determines that the web page meets predefined conditions that warrant blocking the web page. However, current web browser architectures do not allow browser extensions to perform asynchronous blocking operations. Summary of the Invention [Means for solving the problem]
[0003] In one aspect of the invention, a method is provided for enabling a web browser extension to perform an asynchronous blocking operation, the method comprising: configuring a web browser to receive an extension-provided callback function and an indicator from a web browser extension, the extension-provided callback function configured to perform an asynchronous blocking operation, the indicator indicating that the extension callback function is for an asynchronous blocking operation, the extension-provided callback function configured to receive the web browser-provided callback function as a parameter of the extension-provided callback function, the extension-provided callback function configured to call the web browser-provided callback function after performing the asynchronous blocking operation; and configuring the web browser to call the extension-provided callback function with the web browser-provided callback function as a parameter of the extension-provided callback function call if the indicator indicates that the extension callback function is for an asynchronous blocking operation.
[0004] In another aspect of the invention, the method further includes configuring the web browser to call the extension-provided callback function using the web browser-provided callback function as a parameter of the extension-provided callback function call only after determining that the extension is allowed to perform an asynchronous blocking operation.
[0005] In another aspect of the invention, the method further includes configuring the web browser to receive the extension provided callback function and the indicator in a request associated with an event detectable by the web browser.
[0006] In another aspect of the invention, the method further includes configuring the web browser to invoke the invocation of the extension provided callback function in response to the web browser detecting the event. [Brief description of the drawings]
[0007] Aspects of the present invention will be more fully understood and appreciated from the following detailed description taken in conjunction with the accompanying drawings, in which:
[0008] [Figure 1A] FIG. 1 is a simplified conceptual diagram of a system for enabling a web browser extension to perform asynchronous blocking operations, constructed and operative in accordance with an embodiment of the present invention. [Figure 1B] 1B is a simplified operational diagram of an exemplary method of operation of the system of FIG. 1A, operating in accordance with an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Reference is now made to Figures 1A and 1B, which are a simplified conceptual diagram of a system for enabling a web browser extension to perform asynchronous blocking operations, constructed and operative in accordance with an embodiment of the present invention, and a simplified operational diagram of an exemplary method of operation of the system of Figure 1A, operative in accordance with an embodiment of the present invention. In the system of Figure 1A and the method of Figure 1B, a web browser 100 is configured to incorporate functionality of a conventional web browser, e.g., functionality based on the Google™ Chromium™ architecture, and further configured to operate as described below. The web browser 100 may be hosted by any computing device, such as a computer 102, connected to a computer network 104, such as the Internet. The web browser 100 includes a web browser extension 106 configured to perform asynchronous blocking operations, such as to communicate with a network-based service at a computer server 108 via the network 104. The extensions 106 interoperate with the web browser 100 such as through an application programming interface (API) 110 provided by the web browser 100 , the web browser being configured to receive function calls through the API 110 .
[0010] The extension 106 provides to the web browser 100, e.g., via an API call to an event listener function associated with an event detectable by the web browser, a callback function configured to perform the asynchronous blocking operation along with an indicator that the extension-provided callback function is for the asynchronous blocking operation. The extension-provided callback function is configured to receive the web-browser-provided callback function as a parameter of the extension-provided callback function and is configured to call the web-browser-provided callback function after performing the asynchronous blocking operation.
[0011] The web browser 100 is then configured to call the extension-provided callback function, such as when the web browser 100 detects an event that is the subject of the event listener function, and the call to the extension-provided callback function includes the web browser-provided callback function as a parameter if the indicator indicates that the extension-provided callback function is associated with an asynchronous blocking operation. The web browser 100 is preferably configured to provide the web browser-provided callback function to the extension 106 only after determining that the extension 106 is authorized to perform the asynchronous blocking operation, such as in accordance with the techniques described in U.S. patent application Ser. No. 17 / 740,457. The extension-provided callback function then calls the web browser-provided callback function after performing the asynchronous blocking operation.
[0012] In an exemplary implementation of the system of Figure 1A and the method of Figure 1B using Google Chromium™'s WebRequest API, the web browser 100 is configured with a custom binding as follows: The following method is used to install a new event listener.
number
[0013] When an extension 106 invokes an event listener, the following code checks whether the parameters received from the extension 106 include an indicator that the operation being performed by the extension 106 is a "blocking" operation. If so, the method invokes a callback provided by the extension and immediately resolves the event by calling the "webRequestInternal.eventHandled" function, as in the case of a synchronous operation.
number
[0014] However, if the parameters received from the extension 106 include an indicator that the operation to be performed by the extension 106 is an "asyncBlocking" operation, the method invokes a callback provided by the extension and passes the "eventHandled" function to the extension 106 as a callback in the call, as follows:
number
[0015] The extension 106 then performs its asynchronous blocking operation and calls the "eventHandled" function when the operation is complete.
[0016] To do so, the extension 106 is configured to call the event listener using the API 110, such as using the following code:
number
[0017] Some example applications of the system of FIG. 1A and the method of FIG. 1B include the following. Configuring an async proxy for each web request / response where a network request is intercepted and the Google Chromium™ Native Messaging Host is used to send a message to an agent that edits the network request. Modifying the headers and / or payload of network communications using external services (i.e., modifying the User-Agent) where the communications are sent to an external third-party service for decision making and the headers and / or payload are then modified according to the third-party response. Enforcing Multi-factor Authentication (MFA) for certain actions when human interaction and / or I / O operations are required to allow / block a network request, for example, blocking a form submission until the user performs MFA. Reporting requested data and user activity to a third-party logging system for auditing purposes, e.g. logging all external URLs under a specified domain that are called by the browser. · Reporting network performance metrics to external monitoring systems. Redirecting a network request to an external web service, which then decides whether to redirect or forward the original request. Data Loss Prevention (DLP) and content scanning that require intensive computation and / or I / O operations. · Require administrator approval before proceeding with certain network requests.
[0018] Any aspect of the invention described herein may be implemented in computer hardware and / or computer software embodied in a non-transitory computer readable medium in accordance with conventional techniques, where the computer hardware includes one or more computer processors, computer memory, I / O devices and network interfaces that interoperate in accordance with conventional techniques.
[0019] It should be noted that the term "processor" or "device" as used herein is intended to include any processing device, such as, for example, one that includes a CPU (Central Processing Unit) and / or other processing circuitry. It should also be understood that the term "processor" or "device" may refer to multiple processing devices, and that various elements associated with a processing device may be shared by other processing devices.
[0020] The term "memory" as used herein is intended to include memory associated with a processor or CPU, such as, for example, RAM, ROM, fixed memory devices (e.g., hard drives), removable memory devices (e.g., diskettes), flash memory, etc. Such memory may be considered a computer-readable storage medium.
[0021] Furthermore, the term "input / output device" or "I / O device" as used herein is intended to include, for example, one or more input devices (e.g., a keyboard, mouse, scanner, etc.) that input data to a processing unit, and / or one or more output devices (e.g., a speaker, a display, a printer, etc.) that present results associated with a processing unit.
[0022] Embodiments of the invention may include systems, methods, and / or computer program products. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions for causing a processor to perform aspects of the invention.
[0023] A computer-readable storage medium may be a tangible device capable of storing and storing instructions for use by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes portable computer diskettes, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), static random access memories (SRAMs), portable compact disk read-only memories (CD-ROMs), digital versatile disks (DVDs), memory sticks, floppy disks, mechanically encoded devices such as punch cards or raised structures in grooves on which instructions are recorded, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be interpreted as being inherently transitory signals, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over electrical wires.
[0024] The computer-readable program instructions described herein may be downloaded to each computing / processing device from a computer-readable storage medium or to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing / processing device receives the computer-readable program instructions from the network and transfers the computer-readable program instructions for storage on a computer-readable storage medium internal to the respective computing / processing device.
[0025] The computer readable program instructions for carrying out the operations of the present invention may be either assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including object oriented programming languages such as Java, Smalltalk, C++, and traditional procedural programming languages such as the "C" programming language or similar programming languages. The computer readable program instructions may be executed entirely on the user's computer, partially on the user's computer as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic network, a field programmable gate array (FPGA), or a programmable logic array (PLA) may execute computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry to perform aspects of the invention.
[0026] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.
[0027] These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer readable program instructions may further be stored on a computer readable storage medium capable of instructing a computer, programmable data processing apparatus, and / or other device to function in a particular manner, such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture including instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.
[0028] The computer readable program instructions may also be loaded into a computer, other programmable data processing apparatus or other device such that the instructions, which execute on a computer, other programmable apparatus or other device, implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams, causing the computer, other programmable apparatus or other device to perform a series of operational steps to produce a computer-implemented process.
[0029] The flowchart diagrams and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart diagrams or block diagrams may represent a module, segment, or portion of computer instructions, including one or more executable computer instructions for implementing the specified logical function. In some alternative implementations, the functions described in the blocks may be performed in a different order than that described in the drawings. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may be executed in the reverse order depending on the functionality involved. It should be noted that each block in the flowchart diagrams and block diagrams, as well as combinations of such blocks, may be implemented by dedicated hardware-based and / or software-based systems for performing the specified functions or acts.
[0030] The description of various embodiments of the present invention has been presented for purposes of illustration, but is not intended to be exhaustive or to be limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. 1. A method for enabling a web browser extension to perform an asynchronous blocking operation, comprising: Configuring the web browser to receive an extension-provided callback function and an indicator from the web browser extension, the extension provided callback function is configured to perform an asynchronous blocking operation; the indicator indicates that the extension callback function is for an asynchronous blocking operation; The extension provided callback function is configured to receive a web browser provided callback function as a parameter of the extension provided callback function; the extension-provided callback function configured to call the web browser-provided callback function after performing the asynchronous blocking operation; configuring the web browser to call the extension-provided callback function using the web browser-provided callback function as a parameter of the extension-provided callback function call if the indicator indicates that the extension callback function is for an asynchronous blocking operation; A method comprising:
2. 2. The method of claim 1, further comprising: configuring the web browser to call the extension-provided callback function with the web browser-provided callback function as a parameter of the extension-provided callback function call only after determining that the extension is allowed to perform an asynchronous blocking operation.
3. The method of claim 1 , further comprising configuring the web browser to receive the extension-provided callback function and the indicator in a request associated with an event detectable by the web browser.
4. 4. The method of claim 3, further comprising configuring the web browser to invoke the invocation of the extension provided callback function in response to the web browser detecting the event.
Citation Information
Patent Citations
A system for managing extension changes to web pages
JP2017513129A
System for managing extension modifications to web pages
US20150281318A1
Systems and methods to circumvent advertisement blocking on the internet
US20160301735A1
