主权项 |
1. A computer-implemented method comprising:
mediating cross-extension communications between a first browser extension and a second browser extension installed in a web browser running on a computing device, the first browser extension and the second browser extension each providing respective additional functionalities to the web browser, the first browser extension being functionally isolated from the second browser extension, and being unaware of the second browser extension and the additional functionalities being provided by the second browser extension to the web browser, wherein mediating the cross-extension communications includes: receiving a request for a web browser functionality from the first browser extension, at a messaging application programming interface in the web browser, the request not identifying the second extension; determining, by the messaging application programming interface, whether the requested web browser functionality included in the request from the first browser extension is an additional functionality provided to the web browser by the second extension; and forwarding the request received from the first browser extension, by the messaging application programming interface, to the second browser extension, when the requested web browser functionality is an additional functionality provided to the web browser by the second browser extension; intercepting, by the messaging application programming interface, an error from the second browser extension; sending an error message to the first browser extension, by the messaging application programming interface, when the requested web browser functionality is not available, and automatically forwarding the request received from the first browser extension, by the messaging application programming interface, to a third browser extension installed in the web browser of the computing device; and automatically outputting, via the web browser of the computing device, an output provided by the third browser extension. |