onWebPage
Stentor API Reference / stentor-request/src / onWebPage
Function: onWebPage()
onWebPage(
request,pattern):boolean
Defined in: packages/stentor-request/src/RequestConditionalCheck.ts:30
Checks the requests attributes to see if the request originated when the user was on a website that matches the provied pattern.
Parameters​
request​
Request object
pattern​
string
A string that will be matched against the request.attributes.currentUrl key, for example "google.com"
Returns​
boolean
- True if they are on a website that matches the pattern, false if not.