@applitools/dom-capture 10.0.0 → 11.1.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/CHANGELOG.md +21 -2
- package/README.md +40 -1
- package/dist/captureDom.js +2 -2
- package/dist/captureDomAndPoll.js +2 -2
- package/dist/captureDomAndPollForIE.js +2 -2
- package/dist/captureDomCjs.js +2 -2
- package/dist/captureDomForIE.js +2 -2
- package/dist/pollResult.js +2 -2
- package/dist/pollResultForIE.js +2 -2
- package/package.json +14 -5
package/dist/pollResult.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* @applitools/dom-capture@
|
|
1
|
+
/* @applitools/dom-capture@11.1.0 */
|
|
2
2
|
|
|
3
3
|
function __pollResult() {
|
|
4
|
-
var pollResult=function(){"use strict";function t(t,n=0){const e=t.charCodeAt(n);if(e>=55296&&e<56320){return 1024*(e-55296)+(t.charCodeAt(n+1)-56320)+65536}return 56320<=e&&e<=57343?-1:e}var n=function(n,e){const r=[];let o=0;for(let u=0;u<n.length;++u){const
|
|
4
|
+
var pollResult=function(){"use strict";function t(t,n=0){const e=t.charCodeAt(n);if(e>=55296&&e<56320){return 1024*(e-55296)+(t.charCodeAt(n+1)-56320)+65536}return 56320<=e&&e<=57343?-1:e}var n=function(n,e){const r=[];let o=0;for(let u=0;u<n.length;++u){const i=t(n,u);let c=0;i>0&&(c=i<128?1:i<2048?2:i<65536?3:i<2097152?4:i<67108864?5:6),o+c>e?(r.push(u),o=c):o+=c}return r};const e="WIP",r="SUCCESS",o="SUCCESS_CHUNKED",u="ERROR";var i=function(t,i,c={}){const s=function(t,{chunkByteLength:i=0}={}){if(t){if(t.value){if(i){if(!t.chunks){const e=JSON.stringify(t.value);t.chunks=n(e,i),t.chunks.length>0&&(t.from=0,t.value=e)}if(t.from>=0)return{status:o,value:t.value.substring(t.from,t.from=t.chunks.shift()),done:!t.from}}return{status:r,value:t.value}}return t.error?{status:u,error:t.error}:{status:e}}return{status:u,error:"unexpected poll request received - cannot find state of current operation"}}((t=t||{})[i],c);return(s.status===r||s.status===u||s.status===o&&s.done)&&(t[i]=null),s};var c={chunkify:n,pollify:function(t,n,e){return r=>function(){return n[e]||(n[e]={},t.apply(null,arguments).then(t=>n[e].value=t).catch(t=>n[e].error=t.message)),i(n,e,r)}},poll:i,absolutizeUrl:function(t,n){return new URL(t,n).href},isInlineFrame:function(t){return t.contentDocument&&t.contentDocument.location&&!/^https?:$/.test(t.contentDocument.location.protocol)},isAccessibleFrame:function(t){try{const n=t.contentDocument;return Boolean(n&&n.defaultView&&n.defaultView.frameElement)}catch(t){return!1}}},s={EYES_NAMESPACE:"__EYES__APPLITOOLS__",DOM_CAPTURE_KEY:"domCaptureResult",NODE_TYPES:{ELEMENT:1,TEXT:3,DOCUMENT_FRAGMENT:11},DEFAULT_STYLE_PROPS:["background-repeat","background-origin","background-position","background-color","background-image","background-size","border-width","border-color","border-style","color","display","font-size","font-weight","line-height","margin","opacity","overflow","padding","visibility","text-align","position","border-radius","z-index"],DEFAULT_RECT_PROPS:["width","height","top","left"],DEFAULT_IGNORED_TAG_NAMES:["HEAD","SCRIPT"]};const{poll:a}=c,{EYES_NAMESPACE:l,DOM_CAPTURE_KEY:f}=s;return function(t){return JSON.stringify(a(window[l],f,t))}}();
|
|
5
5
|
|
|
6
6
|
return pollResult.apply(this, arguments);
|
|
7
7
|
}
|