@percy/dom 1.28.3 → 1.28.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +3 -2
- package/package.json +3 -3
package/dist/bundle.js
CHANGED
|
@@ -55,11 +55,12 @@
|
|
|
55
55
|
// Adds a `<base>` element to the serialized iframe's `<head>`. This is necessary when
|
|
56
56
|
// embedded documents are serialized and their contents become root-relative.
|
|
57
57
|
function setBaseURI(dom) {
|
|
58
|
+
var _dom$querySelector;
|
|
58
59
|
/* istanbul ignore if: sanity check */
|
|
59
60
|
if (!new URL(dom.baseURI).hostname) return;
|
|
60
61
|
let $base = document.createElement('base');
|
|
61
62
|
$base.href = dom.baseURI;
|
|
62
|
-
dom.querySelector('head').prepend($base);
|
|
63
|
+
(_dom$querySelector = dom.querySelector('head')) === null || _dom$querySelector === void 0 ? void 0 : _dom$querySelector.prepend($base);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
// Recursively serializes iframe documents into srcdoc attributes.
|
|
@@ -535,7 +536,7 @@
|
|
|
535
536
|
`.replace(/(\n|\s{2}|\t)/g, '');
|
|
536
537
|
|
|
537
538
|
// run polyfill as first thing post dom content is loaded
|
|
538
|
-
clone.head.prepend(
|
|
539
|
+
(clone.head ?? clone).prepend();
|
|
539
540
|
}
|
|
540
541
|
|
|
541
542
|
// Returns a copy or new doctype for a document.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/dom",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.4-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public",
|
|
12
|
-
"tag": "
|
|
12
|
+
"tag": "alpha"
|
|
13
13
|
},
|
|
14
14
|
"main": "dist/bundle.js",
|
|
15
15
|
"browser": "dist/bundle.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"interactor.js": "^2.0.0-beta.10"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "596b98dc0cefdb51602facfc1843a9751be8ed2b"
|
|
39
39
|
}
|