Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@applitools/dom-snapshot

Package Overview
Dependencies
Maintainers
55
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/dom-snapshot - npm Package Compare versions

Comparing version 4.7.17 to 4.8.0

12

CHANGELOG.md

@@ -12,2 +12,14 @@ # Changelog

## [4.8.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/dom-snapshot@4.7.17...js/dom-snapshot@4.8.0) (2024-02-18)
### Features
* remove dom snapshot support for IE11 ([#2187](https://github.com/applitools/eyes.sdk.javascript1/issues/2187)) ([4448999](https://github.com/applitools/eyes.sdk.javascript1/commit/4448999ce367f1302eeb36c8484a729fe4e1159b))
### Bug Fixes
* avoid duplicate elements under slots when normal DOM ([#2199](https://github.com/applitools/eyes.sdk.javascript1/issues/2199)) ([0666902](https://github.com/applitools/eyes.sdk.javascript1/commit/0666902254ba5e0ca7b2a7cd1abe1d7d2a3bc837))
## [4.7.17](https://github.com/applitools/eyes.sdk.javascript1/compare/js/dom-snapshot@4.7.16...js/dom-snapshot@4.7.17) (2024-02-13)

@@ -14,0 +26,0 @@

2

dist/pollResult.js

@@ -1,2 +0,2 @@

/* @applitools/dom-snapshot@4.7.17 */
/* @applitools/dom-snapshot@4.8.0 */
function __pollResult() {

@@ -3,0 +3,0 @@ var pollResult=function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e=function(){const t=function(t){return function(){function t(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var e=function(e,n){const r=[];let o=0;for(let u=0;u<e.length;++u){const c=t(e,u);let a=0;c>0&&(a=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),o+a>n?(r.push(u),o=a):o+=a}return r};const n=e,r="WIP",o="SUCCESS",u="SUCCESS_CHUNKED",c="ERROR";var a=function(t,e,a={}){const s=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const r=JSON.stringify(t.value);t.chunks=n(r,e),t.chunks.length>0&&(t.from=0,t.value=r)}catch(t){return{status:c,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:o,value:t.value}}return t.error?{status:c,error:t.error}:{status:r}}return{status:c,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],a);return(s.status===o||s.status===c||s.status===u&&s.done)&&(t[e]=null),s};const s=a;var l={chunkify:e,pollify:function(t,e,n){return r=>function(){return e[n]||(e[n]={},t.apply(null,arguments).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message))),s(e,n,r)}},poll:a,absolutizeUrl:function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const r=new URL(t,e).href;return n?r:decodeURI(r)}catch(e){return n?t:decodeURI(t)}},isInlineFrame:function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)},isAccessibleFrame:function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}};const{poll:i}=l,{EYES_NAMESPACE:f,DOM_SNAPSHOT_KEY:d}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_SNAPSHOT_KEY:"domSnapshotResult"};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){try{return JSON.stringify(i(window[f],d,t))}catch(t){return JSON.stringify({status:"ERROR",error:t.message})}}))}()};let e=!0;try{let n=document.head.querySelector("[data-applitools-sandbox]");n||(n=document.createElement("iframe"),n.setAttribute("data-applitools-sandbox",""),n.setAttribute("data-applitools-skip",""),document.head.appendChild(n));const r=window.crypto.getRandomValues(new Uint32Array(1))[0],o=n.contentDocument.createElement("script");o.textContent=`window['ctor-${r}'] = ${t.toString()};`,n.contentDocument.head.appendChild(o);const u=n.contentWindow[`ctor-${r}`];if("function"!=typeof u)throw new Error("Sandbox failed to extract function");return e=!1,u(document).apply(null,arguments)}catch(n){try{return t(document).apply(null,arguments)}catch(t){throw e?t:n}}};return t(e)}();

@@ -1,2 +0,2 @@

/* @applitools/dom-snapshot@4.7.17 */
/* @applitools/dom-snapshot@4.8.0 */
"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e=function(){const t=function(t){return function(){function t(t,e=0){const n=t.charCodeAt(e);return n>=55296&&n<56320?1024*(n-55296)+(t.charCodeAt(e+1)-56320)+65536:56320<=n&&n<=57343?-1:n}var e=function(e,n){const r=[];let o=0;for(let u=0;u<e.length;++u){const c=t(e,u);let a=0;c>0&&(a=c<128?1:c<2048?2:c<65536?3:c<2097152?4:c<67108864?5:6),o+a>n?(r.push(u),o=a):o+=a}return r};const n=e,r="WIP",o="SUCCESS",u="SUCCESS_CHUNKED",c="ERROR";var a=function(t,e,a={}){const s=function(t,{chunkByteLength:e=0}={}){if(t){if(t.value){if(e){if(!t.chunks)try{const r=JSON.stringify(t.value);t.chunks=n(r,e),t.chunks.length>0&&(t.from=0,t.value=r)}catch(t){return{status:c,error:t.message}}if(t.from>=0)return{status:u,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:o,value:t.value}}return t.error?{status:c,error:t.error}:{status:r}}return{status:c,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[e],a);return(s.status===o||s.status===c||s.status===u&&s.done)&&(t[e]=null),s};const s=a;var l={chunkify:e,pollify:function(t,e,n){return r=>function(){return e[n]||(e[n]={},t.apply(null,arguments).then((t=>e[n].value=t)).catch((t=>e[n].error=t.message))),s(e,n,r)}},poll:a,absolutizeUrl:function(t,e){if(function(t){try{return new URL(t),!0}catch(t){return!1}}(t))return t;let n=!0;try{n=t!==decodeURI(t)}catch(t){n=!0}try{const r=new URL(t,e).href;return n?r:decodeURI(r)}catch(e){return n?t:decodeURI(t)}},isInlineFrame:function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)},isAccessibleFrame:function(t){try{const e=t.contentDocument;return Boolean(e&&e.defaultView&&e.defaultView.frameElement)}catch(t){return!1}}};const{poll:i}=l,{EYES_NAMESPACE:f,DOM_SNAPSHOT_KEY:d}={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_SNAPSHOT_KEY:"domSnapshotResult"};return function(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}((function(t){try{return JSON.stringify(i(window[f],d,t))}catch(t){return JSON.stringify({status:"ERROR",error:t.message})}}))}()};let e=!0;try{let n=document.head.querySelector("[data-applitools-sandbox]");n||(n=document.createElement("iframe"),n.setAttribute("data-applitools-sandbox",""),n.setAttribute("data-applitools-skip",""),document.head.appendChild(n));const r=window.crypto.getRandomValues(new Uint32Array(1))[0],o=n.contentDocument.createElement("script");o.textContent=`window['ctor-${r}'] = ${t.toString()};`,n.contentDocument.head.appendChild(o);const u=n.contentWindow[`ctor-${r}`];if("function"!=typeof u)throw new Error("Sandbox failed to extract function");return e=!1,u(document).apply(null,arguments)}catch(n){try{return t(document).apply(null,arguments)}catch(t){throw e?t:n}}},n=t(e);module.exports=n;

@@ -7,5 +7,2 @@ 'use strict'

const getPollResult = makeGetScript('pollResult')
const getProcessPageForIE = makeGetScript('processPageForIE')
const getProcessPagePollForIE = makeGetScript('processPagePollForIE')
const getPollResultForIE = makeGetScript('pollResultForIE')

@@ -17,7 +14,2 @@ module.exports = {

// IE scripts:
getProcessPageForIE,
getProcessPagePollForIE,
getPollResultForIE,
// cjs

@@ -24,0 +16,0 @@ //eslint-disable-next-line

{
"name": "@applitools/dom-snapshot",
"version": "4.7.17",
"version": "4.8.0",
"homepage": "https://applitools.com",

@@ -17,4 +17,3 @@ "license": "SEE LICENSE IN LICENSE",

"lint": "run --top-level eslint '**/*.js'",
"build": "APPLITOOLS_BUILD_MODE=all rollup -c src/build/rollup.config.js",
"build:short": "APPLITOOLS_BUILD_MODE=short rollup -c src/build/rollup.config.js",
"build": "rollup -c src/build/rollup.config.js",
"build:pretty": "APPLITOOLS_BUILD_MODE=pretty rollup -c src/build/rollup.config.js",

@@ -21,0 +20,0 @@ "build:watch": "yarn build:short --watch",

@@ -21,11 +21,5 @@ # dom-snapshot

The same 3 scripts are available in a transpiled version when running IE 11:
- `getProcessPageForIE`
- `getProcessPagePollForIE`
- `getPollResultForIE`
The following methods are deprecated:
- `getProcessPageAndSerialize`
- `getProcessPageAndSerializePoll`
- `getProcessPageAndSerializeForIE`

@@ -32,0 +26,0 @@ These async functions return a string with a function that can be sent to the browser for evaluation. It doesn't immediately invoke the function, so the sender should wrap it as an IIFE. For example:

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc