Skip to content

Commit dc437ef

Browse files
add new option loadDomContent
1 parent 3b08256 commit dc437ef

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/lib/processSnapshot.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
167167
return false;
168168
}
169169

170+
if (options.loadDomContent) {
171+
processedOptions.loadDomContent = true;
172+
}
173+
170174
if (options.web && Object.keys(options.web).length) {
171175
processedOptions.web = {};
172176

src/lib/schemaValidation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ const SnapshotSchema: JSONSchemaType<Snapshot> = {
351351
},
352352
required: ["devices"],
353353
errorMessage: "Invalid snapshot options; mobile must include devices property."
354+
},
355+
loadDomContent: {
356+
type: "boolean",
357+
errorMessage: "Invalid snapshot options; loadDomContent must be a boolean"
354358
}
355359
},
356360
additionalProperties: false

src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ export interface Snapshot {
103103
devices: string[],
104104
fullPage?: boolean,
105105
orientation?: string
106-
}
106+
},
107+
loadDomContent?: boolean;
107108
}
108109
}
109110

0 commit comments

Comments
 (0)