Skip to content

ElectronWebContentsModule.fromId method

ElectronWebContentsModule › fromId

Unofficial

Looks up a WebContents instance based on its ID.

Signature:

fromId(id: number): ElectronWebContents | undefined

Parameters:

Parameter Type Description
id number The ID to look up.

Returns: ElectronWebContents | undefinedA WebContents instance with the given ID, or undefined if there is no WebContents associated with the given ID.