mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: warning unicity of webRequest event listener (#13482)
This commit is contained in:
committed by
Samuel Attard
parent
4bcf0e34c5
commit
2bba11c5b0
@@ -9,8 +9,9 @@ property of a `Session`.
|
||||
|
||||
The methods of `WebRequest` accept an optional `filter` and a `listener`. The
|
||||
`listener` will be called with `listener(details)` when the API's event has
|
||||
happened. The `details` object describes the request. Passing `null`
|
||||
as `listener` will unsubscribe from the event.
|
||||
happened. The `details` object describes the request.
|
||||
|
||||
⚠️ Only the last attached `listener` will be used. Passing `null` as `listener` will unsubscribe from the event.
|
||||
|
||||
The `filter` object has a `urls` property which is an Array of URL
|
||||
patterns that will be used to filter out the requests that do not match the URL
|
||||
|
||||
Reference in New Issue
Block a user