Skip to content

Commit

Permalink
Merge pull request #346 from ulixee/plugin-export
Browse files Browse the repository at this point in the history
Plugin export
  • Loading branch information
blakebyrnes authored Sep 8, 2021
2 parents a4f1289 + 882674c commit 00f81f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions plugin-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import {
BrowserEmulatorClassDecorator,
} from '@secret-agent/interfaces/ICorePlugin';
import BrowserEmulator from './lib/BrowserEmulator';
import CorePlugin from './lib/CorePlugin';
import ClientPlugin from './lib/ClientPlugin';

export {
ClientPlugin,
CorePlugin,
BrowserEmulatorClassDecorator,
BrowserEmulator,
IBrowserEmulator,
Expand Down
12 changes: 7 additions & 5 deletions website/docs/Plugins/BrowserEmulators.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ADVICE: Unless you have access to the exact data that a browser resembles, it's

## Special Class Properties

BrowserEmulators have all the same class properties as core plugins, with one significant change, the type property` must always be set to `CorePlugin:BrowserEmulator` instead of just `CorePlugin`:
BrowserEmulators have all the same class properties as core plugins, with one significant change, the type property must always be set to `CorePlugin:BrowserEmulator` instead of just `CorePlugin`:

### BrowserEmulator.type *required*
This tells SecretAgent the plugin is a special BrowserEmulator.
Expand All @@ -28,10 +28,12 @@ See @secret-agent/default-browser-emulator for an implementation example.

This is called every time a new browser engine is started, which may not be every session. A single browser engine is used across multiple sessions through isolated tabs.

#### **Returns** `Promise<Object>`
- showBrowser: boolean
- disableGpu: boolean
- disableDevtools: boolean
#### **Arguments**:

- launchSettings: `object`
- showBrowser: `boolean` - has the user requested to show the browser
- disableGpu: `boolean` - has the user requested to disable the gpu
- disableDevtools: `boolean` - has the user requested to disable automatically showing devtools

## Special Instance Properties

Expand Down

0 comments on commit 00f81f7

Please sign in to comment.