@applitools/eyes-sdk-core
Advanced tools
Comparing version 4.6.4 to 4.7.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [4.7.0](https://github.com/applitools/eyes.sdk.javascript1/compare/@applitools/eyes-sdk-core@4.6.4...@applitools/eyes-sdk-core@4.7.0) (2019-01-29) | ||
### Features | ||
* **eyes-sdk-core:** add blankCorsIframeSrcOfCdt method to CorsIframeHandler ([2801841](https://github.com/applitools/eyes.sdk.javascript1/commit/2801841)) | ||
* **eyes-sdk-core:** add export of CorsIframeHandle, CorsIframeHandler ([4bd139e](https://github.com/applitools/eyes.sdk.javascript1/commit/4bd139e)) | ||
## [4.6.4](https://github.com/applitools/eyes.sdk.javascript1/compare/@applitools/eyes-sdk-core@4.6.3...@applitools/eyes-sdk-core@4.6.4) (2019-01-28) | ||
@@ -8,0 +20,0 @@ |
@@ -15,2 +15,4 @@ 'use strict'; | ||
exports.ImageProvider = require('./lib/capture/ImageProvider').ImageProvider; | ||
exports.CorsIframeHandle = require('./lib/capture/CorsIframeHandler').CorsIframeHandle; | ||
exports.CorsIframeHandler = require('./lib/capture/CorsIframeHandler').CorsIframeHandler; | ||
@@ -17,0 +19,0 @@ exports.CutProvider = require('./lib/cropping/CutProvider').CutProvider; |
'use strict'; | ||
const {URL} = require('url'); | ||
const { URL } = require('url'); | ||
@@ -46,2 +46,21 @@ /** | ||
} | ||
static blankCorsIframeSrcOfCdt(cdt, frames) { | ||
const frameUrls = new Set(frames.map(frame => frame.srcAttr)); | ||
cdt.map(node => { | ||
if (node.nodeName === 'IFRAME') { | ||
const srcAttr = node.attributes.find(attr => attr.name === 'src'); | ||
if (srcAttr && !frameUrls.has(srcAttr.value)) { | ||
srcAttr.value = ''; | ||
} | ||
} | ||
return node | ||
}); | ||
frames.forEach(frame => { | ||
CorsIframeHandler.blankCorsIframeSrcOfCdt(frame.cdt, frame.frames) | ||
}); | ||
return cdt | ||
} | ||
} | ||
@@ -48,0 +67,0 @@ |
{ | ||
"name": "@applitools/eyes-sdk-core", | ||
"version": "4.6.4", | ||
"version": "4.7.0", | ||
"description": "The core components of Eyes JavaScript SDK", | ||
@@ -49,3 +49,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "489dbd47cabf97d8c8f8cb57683c44285bd31501" | ||
"gitHead": "9d3a55cd86bf6cc34d98fa5acc51cd4227963b5d" | ||
} |
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
375696
11274