Skip to content

Commit 24d0661

Browse files
authored
update behaviors + update docs with onPageInit (#1062)
- deps: bump browsertrix-behaviors to 0.11.0 which introduces onPageInit() to support youtube - mention onPageInit() function added in browsertrix-behaviors 0.11.0 in behaviors docs
1 parent 774867b commit 24d0661

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

docs/docs/user-guide/behaviors.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ class MyBehavior
157157
// if false, or not defined, this behavior will be skipped for iframes.
158158
static runInIframe = false;
159159

160+
// optional: if defined, this function is run at the time the behavior
161+
// is first loaded.
162+
// useful for logic that needs to be run as early as possible.
163+
static onPageInit() {
164+
165+
}
166+
160167
// optional: if defined, provides a way to define a custom way to determine
161168
// when a page has finished loading beyond the standard 'load' event.
162169
//

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@novnc/novnc": "1.7.0",
2222
"@puppeteer/replay": "^3.1.3",
2323
"@webrecorder/wabac": "^2.26.5",
24-
"browsertrix-behaviors": "^0.10.1",
24+
"browsertrix-behaviors": "^0.11.0",
2525
"client-zip": "^2.4.5",
2626
"css-selector-parser": "^3.0.5",
2727
"fetch-socks": "^1.3.2",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,10 +2031,10 @@ browserslist@^4.24.0:
20312031
node-releases "^2.0.18"
20322032
update-browserslist-db "^1.1.1"
20332033

2034-
browsertrix-behaviors@^0.10.1:
2035-
version "0.10.1"
2036-
resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.10.1.tgz#0151f9628d9f66de3ebe28250edf71f958105fa4"
2037-
integrity sha512-5y5hO4Ff5MZwJPfeA4CvpxFN75nbg6szNuXKMPqgbeuv3cSXYurZLuNamX4DetkVXES2M+IKcfn4OEUjkp02bA==
2034+
browsertrix-behaviors@^0.11.0:
2035+
version "0.11.0"
2036+
resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.11.0.tgz#4238e73f37394c25b6731d54dfd546498a8dcfb2"
2037+
integrity sha512-DEmKAcyZrBIoObuBzeQ/XYoN+Hi80nZBnavfj8pJcNTgnKU50Oc5oac6dojOmnihdGrtM3Ex2+QelXtynVwb7g==
20382038
dependencies:
20392039
query-selector-shadow-dom "^1.0.1"
20402040

0 commit comments

Comments
 (0)