mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-21 10:18:19 +08:00
Merge pull request #3482 from NN---/patch-8
Add optional filters to webNavigation events
This commit is contained in:
Vendored
+12
-8
@@ -2173,20 +2173,24 @@ declare module chrome.webNavigation {
|
||||
error: string;
|
||||
}
|
||||
|
||||
interface WebNavigationEventFilters {
|
||||
url: chrome.events.UrlFilter[];
|
||||
}
|
||||
|
||||
interface WebNavigationReferenceFragmentUpdatedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: ReferenceFragmentUpdatedDetails) => void): void;
|
||||
addListener(callback: (details: ReferenceFragmentUpdatedDetails) => void, filters? : WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationCompletedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: CompletedDetails) => void): void;
|
||||
addListener(callback: (details: CompletedDetails) => void, filters? : WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationHistoryStateUpdatedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: HistoryStateUpdatedDetails) => void): void;
|
||||
addListener(callback: (details: HistoryStateUpdatedDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationCreatedNavigationTargetEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: CreatedNavigationTargetDetails) => void): void;
|
||||
addListener(callback: (details: CreatedNavigationTargetDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationTabReplacedEvent extends chrome.events.Event {
|
||||
@@ -2194,19 +2198,19 @@ declare module chrome.webNavigation {
|
||||
}
|
||||
|
||||
interface WebNavigationBeforeNavigateEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: BeforeNavigateDetails) => void): void;
|
||||
addListener(callback: (details: BeforeNavigateDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationCommittedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: CommittedDetails) => void): void;
|
||||
addListener(callback: (details: CommittedDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationDomContentLoadedEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: DomContentLoadedDetails) => void): void;
|
||||
addListener(callback: (details: DomContentLoadedDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
interface WebNavigationErrorOccurredEvent extends chrome.events.Event {
|
||||
addListener(callback: (details: ErrorOccurredDetails) => void): void;
|
||||
addListener(callback: (details: ErrorOccurredDetails) => void, filters?: WebNavigationEventFilters): void;
|
||||
}
|
||||
|
||||
export function getFrame(details: GetFrameDetails, callback: (details?: GetFrameResultDetails) => void): void;
|
||||
|
||||
Reference in New Issue
Block a user