JavaScript Dialog On Entry
Whether a script tried to trigger a JavaScript dialog on page entry.
version : 1.0.0
stability: stable
Definition
Meta
name : "javascript-dialog-on-entry"
category : "USER_EXPERIENCE"
reference: "0"
condition: ">"
Record
The JavaScript Dialog On Entry
's record implements the Record
's interface:
interface Record {
url: string;
type: DialogEventType; // "ALERT" | "CONFIRM" | "PROMPT" | "BEFORE_UNLOAD" | "OTHER"
data: string;
trigger: string;
requestId: string;
frameId: string;
targetVersion: string;
timestamp: MonotonicTime;
}
Fields
url
version : 1.0.0
stability: stable
url: string;
The URL of the page gathered when the event occurs.
type
version : 1.0.0
stability: stable
type: DialogEventType;
enum DialogEventType {
Alert = 'ALERT',
Confirm = 'CONFIRM',
Prompt = 'PROMPT',
BeforeUnload = 'BEFORE_UNLOAD',
Other = 'OTHER',
}
The dialog's event that triggered the creation of the record.
data
version : 1.0.0
stability: stable
data: string;
The data passed along with the event.
In the
JavaScript Dialog On Entry
's context, this field reports aDialogEventRecordData
entry as string:
interface DialogEventRecordData { message: string; }
message
: The message returned by the dialog event.
trigger
version : 1.0.0
stability: experimental
trigger: string;
When defined, the trigger
reports the action that creates the JavaScript Dialog On Entry
.
requestId
version : 1.0.0
stability: stable
requestId: string;
The unique network Request
's identifier in which the event was recorded.
⚠️ Caution: In some cases such as in a redirection context, this identifier could be shared by more than one entry:
[ { "requestId": "10.1", "status": "302" }, { "requestId": "10.1", "status": "200" } ]
frameId
version : 1.0.0
stability: stable
frameId: string;
The Frame
identifier in which the event was recorded.
targetVersion
version : 1.0.0
stability: stable
targetVersion: string;
The Target
version during which the event was recorded.
timestamp
version : 1.0.0
stability: stable
timestamp: MonotonicTime;
An MonotonicTime
that reflects the time when the event was recorded.
Sample
{
"name": "javascript-dialog-on-entry",
"category": "USER_EXPERIENCE",
"value": "1",
"reference": "0",
"condition": ">",
"violation": true,
"notify": true,
"alert": true,
"records": [
{
"url": "https://example.com",
"type": "ALERT",
"data": "{\"message\":\"Hello world!\"}",
"trigger": "",
"requestId": "6A84237A55993581955FEBCCBED0D402",
"frameId": "C9FB7BD57BBC8502412B9558A97A580D",
"targetVersion": "8",
"timestamp": "2375.395531"
}
]
}