You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: PLUGINS.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,16 @@ Plugins are dynamically loaded by the scanner when it runs. The scanner will loo
12
12
13
13
When the default function is invoked, the following arguments are passed to the function:
14
14
15
-
-`page`: this is the [playwright page](https://playwright.dev/docs/api/class-page) instance.
16
-
-`addFinding`: this is a function that will add a finding to the list. Findings are used to generate and file issues. This function expects a single object as an argument, and it should match the [`Finding` type](https://github.com/github/accessibility-scanner/blob/main/.github/actions/find/src/types.d.ts#L1-L9).
15
+
#### `page`
16
+
17
+
This is the [playwright page](https://playwright.dev/docs/api/class-page) instance.
18
+
19
+
#### `addFinding`
20
+
21
+
This is a function that will add a finding to the list. Findings are used to generate and file issues. This function has 2 arguments:
22
+
23
+
1. An object that should match the [`Finding` type](https://github.com/github/accessibility-scanner/blob/main/.github/actions/find/src/types.d.ts#L1-L9).
24
+
2. An 'options' object that has an optional `includeScreenshots` field. This function will automatically generate a screenshot and add the screenshotId to the `Finding` data if `includeScreenshots` is true in either the action input, or in the options field of this function.
0 commit comments