Namespace: onPageVisitStart

pageManager.onPageVisitStart

An event that is fired in the background script environment when a page visit starts in the content script environment.

Source:

Methods

(static) addListener(listener, options)

Add a listener for the onPageVisitStart event.

Parameters:
Name Type Description
listener pageVisitStartListener

The listener to add.

options Object

Options for the listener.

Properties
Name Type Attributes Default Description
privateWindows boolean <optional>
false

Whether to notify the listener for events in private windows.

Source:

(static) hasAnyListeners() → {boolean}

Whether the onPageVisitStart event has any listeners.

Source:
Returns:

Whether the event has any listeners.

Type
boolean

(static) hasListener(listener) → {boolean}

Whether a specified listener has been added for the onPageVisitStart event.

Parameters:
Name Type Description
listener pageVisitStartListener

The listener to check.

Source:
Returns:

Whether the listener has been added for the event.

Type
boolean

(static) removeListener(listener)

Remove a listener for the onPageVisitStart event.

Parameters:
Name Type Description
listener pageVisitStartListener

The listener to remove.

Source:

Type Definitions

pageVisitStartListener(details)

A listener for the onPageVisitStart event.

Parameters:
Name Type Description
details Object

Additional information about the page visit start event.

Properties
Name Type Description
pageId string

The ID for the page, unique across browsing sessions.

tabId number

The ID for the tab containing the page, unique to the browsing session. Note that if you send a message to the content script in the tab, there is a possible race condition where the page in the tab changes before your message arrives. You should specify a page ID (e.g., pageId) in your message to the content script, and the content script should check that page ID against its current page ID to ensure that the message was received by the intended page.

windowId number

The ID for the window containing the page, unique to the browsing session. Note that tabs can subsequently move between windows.

url string

The URL of the page loading in the tab, without any hash.

referrer string

The referrer URL for the page loading in the tab, or "" if there is no referrer.

pageVisitStartTime number

The time when the underlying event fired.

privateWindow boolean

Whether the page is in a private window.

isHistoryChange boolean

Whether the page visit was caused by a change via the History API.

Source: