1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Raymond Hill
5d60df4b1b
Fix bad eslint rule + minor code review
`webext.js` module needs to be explicitly imported.

Added time-based heuristic to decide when a webpage loses
communication with background process.
2024-03-22 14:46:57 -04:00
Raymond Hill
3f7374c1f1
Mind that tabs.sendMessage can throw 2024-03-17 09:34:05 -04:00
Raymond Hill
63fe18a761
Do not exceed rate-limited calls to handlerBehaviorChanged()
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3063

To prevent spurious performance warnings by chromium-based browsers.
2024-01-11 13:25:19 -05:00
Raymond Hill
a969a672e0
Change official description in source code top comment 2023-12-04 12:10:34 -05:00
Raymond Hill
67fb969572
Refactoring: Replace DOM events with broadcast channels
Broadcast channels are more suited to uBO than DOM events to dispatch
notifications to different parts of uBO.

DOM events can only be dispatched to local context, broadcast channels
dispatch to all contexts (i.e. background process, workers, auxiliary
pages) -- this last behavior is better suited to uBO to communicate
internal changes to all potential listeners, not just those in the local
context.

Additionally, broadcasting to content scripts is now done through
tabs.sendMessage() instead of through potentially opened message
ports, this simplifies broadcasting to content scripts, and this
doesn't require to have long-lived message ports in content
scripts.
2023-12-01 14:35:28 -05:00