Enabling web browser extensions to perform asynchronous blocking operations

The method allows web browser extensions to perform asynchronous blocking operations by configuring callback functions, enhancing their ability to manage complex events and operations.

JP7756803B2Active Publication Date: 2025-10-20ISLAND TECH INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024534770
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-12-14
Filing Date
2022-12-14
Publication Date
2025-10-20
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

Current web browser architectures do not allow browser extensions to perform asynchronous blocking operations, limiting their functionality in managing certain events.

Method used

A method is implemented to enable web browser extensions to perform asynchronous blocking operations by configuring the browser to receive and invoke extension-provided callback functions with indicators, allowing asynchronous operations after authorization.

Benefits of technology

Enables web browser extensions to perform complex operations like data reporting, network redirection, and content modification asynchronously, enhancing functionality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007756803000005
    Figure 0007756803000005
  • Figure 0007756803000006
    Figure 0007756803000006
  • Figure 0007756803000001
    Figure 0007756803000001
Patent Text Reader

Abstract

Enabling a web browser extension to perform an asynchronous blocking operation by: 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, and 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 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.
Need to check novelty before this filing date? Find Prior Art

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 additional functionality to the web browser, 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 specific 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 architecture does 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 asynchronous blocking operations, 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 the asynchronous blocking operation, the indicator indicating that the extension callback function is for the asynchronous blocking operation, the extension callback function configured to receive the web browser-provided callback function as a parameter of the extension-provided callback function, and the extension 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 the 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 provision 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 provision callback function in response to the web browser detecting the event. [Brief explanation of the drawings]

[0007] Aspects of the present invention will be more fully understood and appreciated from the following detailed description read in conjunction with the accompanying drawings, in which:

[0008] [Figure 1A] FIG. 1 is a simplified conceptual diagram of a system for enabling web browser extensions 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 INVENTION

[0009] Reference is now made to Figures 1A and 1B, where Figure 1A 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, and Figure 1B is 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. 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. Web browser 100 includes a web browser extension 106 configured to perform asynchronous blocking operations, such as to communicate with a network-based service on a computer server 108 via network 104. The extension 106 interoperates 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, for example 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 relates to 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 invoke 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 invokes 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, 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 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, just 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 being 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 the 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 invoke 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 the network request is intercepted and Google Chromium™ NativeMessagingHost 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) when 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 and blocking it until the user performs MFA. Reporting requested data and user activity to third-party logging systems for auditing purposes, for example, 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 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., keyboard, mouse, scanner, etc.) that input data to a processing unit, and / or one or more output devices (e.g., speaker, display, printer, etc.) that present results associated with a processing unit.

[0022] Embodiments of the invention may include systems, methods, and / or computer program products, which 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 that can retain and store 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 memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded devices such as punch cards or raised structures in slots on which instructions are recorded, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be construed 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 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 via 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 fiber transmissions, wireless transmissions, 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 forwards the computer-readable program instructions for storage on a computer-readable storage medium within the respective computing / processing device.

[0025] The computer-readable program instructions for carrying out the operations of the present invention may be either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as the "C" programming language or similar. The computer-readable program instructions may execute 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 present 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 also be stored on a computer-readable storage medium that can instruct a computer, programmable data processing apparatus, and / or other device to function in a particular way, such that the computer-readable storage medium on which the instructions are stored comprises an article of manufacture containing 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, causing the computer, other programmable apparatus, or other device to perform a series of operational steps to produce a computer-implemented process, such that the instructions, which execute on the computer, other programmable apparatus, or other device, implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0029] The flowcharts and block diagrams in the figures 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 flowcharts or block diagrams may represent a module, segment, or portion of computer instructions, which comprises one or more executable computer instructions that implement the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending on the functionality involved. It should be noted that each block in the flowcharts and block diagrams, and combinations of such blocks, may be implemented by dedicated hardware-based and / or software-based systems that perform the specified functions or acts.

[0030] The description of various embodiments of the present invention has been presented for purposes of illustration and 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 asynchronous blocking operations, comprising: Configuring the web browser to receive an extension provision 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 extended function provided callback function is related to the asynchronous blocking operation; The extension provision callback function is configured to receive a web browser provided callback function as a parameter of the extension provision callback function; the extension-provided callback function is configured to call the web browser-provided callback function after performing the asynchronous blocking operation; configuring the web browser to invoke 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 provided 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 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 asynchronous blocking operations.

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 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