@applitools/dom-snapshot
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -1,2 +0,2 @@ | ||
/* @applitools/dom-snapshot@1.4.0 */ | ||
/* @applitools/dom-snapshot@1.4.1 */ | ||
@@ -337,3 +337,2 @@ function __processPage() { | ||
extractResourcesFromSvg, | ||
isSameOrigin, | ||
cache = {}, | ||
@@ -348,3 +347,3 @@ }) { | ||
.catch(e => { | ||
if (probablyCORS(e, url)) { | ||
if (probablyCORS(e)) { | ||
return {probablyCORS: true, url}; | ||
@@ -391,3 +390,3 @@ } else { | ||
function probablyCORS(err, url) { | ||
function probablyCORS(err) { | ||
const msgCORS = | ||
@@ -397,3 +396,3 @@ err.message && | ||
const nameCORS = err.name && err.name.includes('TypeError'); | ||
return msgCORS && nameCORS && !isSameOrigin(url, baseUrl); | ||
return msgCORS && nameCORS; | ||
} | ||
@@ -566,14 +565,2 @@ }; | ||
function isSameOrigin(url, baseUrl) { | ||
const blobOrData = /^(blob|data):/; | ||
if (blobOrData.test(url)) return true; | ||
if (blobOrData.test(baseUrl)) return false; | ||
const {origin} = new URL(url, baseUrl); | ||
const {origin: baseOrigin} = new URL(baseUrl); | ||
return origin === baseOrigin; | ||
} | ||
var isSameOrigin_1 = isSameOrigin; | ||
function processPage(doc = document) { | ||
@@ -590,3 +577,2 @@ const styleSheetCache = {}; | ||
absolutizeUrl: absolutizeUrl_1, | ||
isSameOrigin: isSameOrigin_1, | ||
}); | ||
@@ -593,0 +579,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* @applitools/dom-snapshot@1.4.0 */ | ||
/* @applitools/dom-snapshot@1.4.1 */ | ||
@@ -389,3 +389,2 @@ function __processPageAndPoll() { | ||
extractResourcesFromSvg, | ||
isSameOrigin, | ||
cache = {}, | ||
@@ -400,3 +399,3 @@ }) { | ||
.catch(e => { | ||
if (probablyCORS(e, url)) { | ||
if (probablyCORS(e)) { | ||
return {probablyCORS: true, url}; | ||
@@ -443,3 +442,3 @@ } else { | ||
function probablyCORS(err, url) { | ||
function probablyCORS(err) { | ||
const msgCORS = | ||
@@ -449,3 +448,3 @@ err.message && | ||
const nameCORS = err.name && err.name.includes('TypeError'); | ||
return msgCORS && nameCORS && !isSameOrigin(url, baseUrl); | ||
return msgCORS && nameCORS; | ||
} | ||
@@ -618,14 +617,2 @@ }; | ||
function isSameOrigin(url, baseUrl) { | ||
const blobOrData = /^(blob|data):/; | ||
if (blobOrData.test(url)) return true; | ||
if (blobOrData.test(baseUrl)) return false; | ||
const {origin} = new URL(url, baseUrl); | ||
const {origin: baseOrigin} = new URL(baseUrl); | ||
return origin === baseOrigin; | ||
} | ||
var isSameOrigin_1 = isSameOrigin; | ||
function processPage(doc = document) { | ||
@@ -642,3 +629,2 @@ const styleSheetCache = {}; | ||
absolutizeUrl: absolutizeUrl_1, | ||
isSameOrigin: isSameOrigin_1, | ||
}); | ||
@@ -645,0 +631,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* @applitools/dom-snapshot@1.4.0 */ | ||
/* @applitools/dom-snapshot@1.4.1 */ | ||
@@ -389,3 +389,2 @@ function __processPageAndSerialize() { | ||
extractResourcesFromSvg, | ||
isSameOrigin, | ||
cache = {}, | ||
@@ -400,3 +399,3 @@ }) { | ||
.catch(e => { | ||
if (probablyCORS(e, url)) { | ||
if (probablyCORS(e)) { | ||
return {probablyCORS: true, url}; | ||
@@ -443,3 +442,3 @@ } else { | ||
function probablyCORS(err, url) { | ||
function probablyCORS(err) { | ||
const msgCORS = | ||
@@ -449,3 +448,3 @@ err.message && | ||
const nameCORS = err.name && err.name.includes('TypeError'); | ||
return msgCORS && nameCORS && !isSameOrigin(url, baseUrl); | ||
return msgCORS && nameCORS; | ||
} | ||
@@ -618,14 +617,2 @@ }; | ||
function isSameOrigin(url, baseUrl) { | ||
const blobOrData = /^(blob|data):/; | ||
if (blobOrData.test(url)) return true; | ||
if (blobOrData.test(baseUrl)) return false; | ||
const {origin} = new URL(url, baseUrl); | ||
const {origin: baseOrigin} = new URL(baseUrl); | ||
return origin === baseOrigin; | ||
} | ||
var isSameOrigin_1 = isSameOrigin; | ||
function processPage(doc = document) { | ||
@@ -642,3 +629,2 @@ const styleSheetCache = {}; | ||
absolutizeUrl: absolutizeUrl_1, | ||
isSameOrigin: isSameOrigin_1, | ||
}); | ||
@@ -645,0 +631,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* @applitools/dom-snapshot@1.4.0 */ | ||
/* @applitools/dom-snapshot@1.4.1 */ | ||
'use strict'; | ||
@@ -334,3 +334,2 @@ | ||
extractResourcesFromSvg, | ||
isSameOrigin, | ||
cache = {}, | ||
@@ -345,3 +344,3 @@ }) { | ||
.catch(e => { | ||
if (probablyCORS(e, url)) { | ||
if (probablyCORS(e)) { | ||
return {probablyCORS: true, url}; | ||
@@ -388,3 +387,3 @@ } else { | ||
function probablyCORS(err, url) { | ||
function probablyCORS(err) { | ||
const msgCORS = | ||
@@ -394,3 +393,3 @@ err.message && | ||
const nameCORS = err.name && err.name.includes('TypeError'); | ||
return msgCORS && nameCORS && !isSameOrigin(url, baseUrl); | ||
return msgCORS && nameCORS; | ||
} | ||
@@ -563,14 +562,2 @@ }; | ||
function isSameOrigin(url, baseUrl) { | ||
const blobOrData = /^(blob|data):/; | ||
if (blobOrData.test(url)) return true; | ||
if (blobOrData.test(baseUrl)) return false; | ||
const {origin} = new URL(url, baseUrl); | ||
const {origin: baseOrigin} = new URL(baseUrl); | ||
return origin === baseOrigin; | ||
} | ||
var isSameOrigin_1 = isSameOrigin; | ||
function processPage(doc = document) { | ||
@@ -587,3 +574,2 @@ const styleSheetCache = {}; | ||
absolutizeUrl: absolutizeUrl_1, | ||
isSameOrigin: isSameOrigin_1, | ||
}); | ||
@@ -590,0 +576,0 @@ |
{ | ||
"name": "@applitools/dom-snapshot", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -21,3 +21,2 @@ 'use strict'; | ||
const filterInlineUrl = require('./filterInlineUrl'); | ||
const isSameOrigin = require('./isSameOrigin'); | ||
@@ -35,3 +34,2 @@ function processPage(doc = document) { | ||
absolutizeUrl, | ||
isSameOrigin, | ||
}); | ||
@@ -38,0 +36,0 @@ |
@@ -12,3 +12,2 @@ 'use strict'; | ||
extractResourcesFromSvg, | ||
isSameOrigin, | ||
cache = {}, | ||
@@ -23,3 +22,3 @@ }) { | ||
.catch(e => { | ||
if (probablyCORS(e, url)) { | ||
if (probablyCORS(e)) { | ||
return {probablyCORS: true, url}; | ||
@@ -66,3 +65,3 @@ } else { | ||
function probablyCORS(err, url) { | ||
function probablyCORS(err) { | ||
const msgCORS = | ||
@@ -72,3 +71,3 @@ err.message && | ||
const nameCORS = err.name && err.name.includes('TypeError'); | ||
return msgCORS && nameCORS && !isSameOrigin(url, baseUrl); | ||
return msgCORS && nameCORS; | ||
} | ||
@@ -75,0 +74,0 @@ }; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
568319
40
12065