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

rrweb-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb-snapshot - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

3

dist/rrweb-snapshot.js

@@ -46,5 +46,6 @@ var rrwebSnapshot = (function (exports) {

var URL_IN_CSS_REF = /url\((['"]|)([^'"]*)\1\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (_1, _2, filePath) {
if (!/^[./]/.test(filePath)) {
if (!RELATIVE_PATH.test(filePath)) {
return "url('" + filePath + "')";

@@ -51,0 +52,0 @@ }

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

var rrwebSnapshot=function(e){"use strict";var t;(t=e.NodeType||(e.NodeType={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var r=1;function n(){r=1}var a=/url\((['"]|)([^'"]*)\1\)/gm;function o(e,t){return e.replace(a,function(e,r,n){if(!/^[.\/]/.test(n))return"url('"+n+"')";if("/"===n[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+n)+"')";var a,o=t.split("/"),u=n.split("/");o.pop();for(var c=0,i=u;c<i.length;c++){var s=i[c];"."!==s&&(".."===s?o.pop():o.push(s))}return"url('"+o.join("/")+"')"})}function u(e,t){var r=e.createElement("a");return r.href=t,r.href}function c(t,r){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.NodeType.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.NodeType.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:for(var n=t.tagName.toLowerCase(),a={},c=0,i=Array.from(t.attributes);c<i.length;c++){var s=i[c],l=s.name,p=s.value;a[l]="src"===l||"href"===l?u(r,p):p}if("link"===n){var d=Array.from(r.styleSheets).find(function(e){return e.href===t.href}),m=function(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}(d);m&&(a={_cssText:o(m,d.href)})}if("input"===n||"textarea"===n||"select"===n){p=t.value;"radio"!==a.type&&"checkbox"!==a.type&&p?a.value=p:t.checked&&(a.checked=t.checked)}if("option"===n){var y=t.parentElement;a.value===y.value&&(a.selected=t.selected)}return{type:e.NodeType.Element,tagName:n,attributes:a,childNodes:[],isSVG:(v=t,"svg"===v.tagName||v instanceof SVGElement||void 0)};case t.TEXT_NODE:var T=t.parentNode&&t.parentNode.tagName,f=t.textContent,N="STYLE"===T||void 0;return N&&f&&(f=o(f,location.href)),"SCRIPT"===T&&(f="SCRIPT_PLACEHOLDER"),{type:e.NodeType.Text,textContent:f||"",isStyle:N};case t.CDATA_SECTION_NODE:return{type:e.NodeType.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.NodeType.Comment,textContent:t.textContent||""};default:return!1}var v}function i(t,n,a,o){void 0===o&&(o=!1);var u=c(t,n);if(!u)return console.warn(t,"not serialized"),null;var s=Object.assign(u,{id:r++});if(t.__sn=s,a[s.id]=t,(s.type===e.NodeType.Document||s.type===e.NodeType.Element)&&!o)for(var l=0,p=Array.from(t.childNodes);l<p.length;l++){var d=i(p[l],n,a);d&&s.childNodes.push(d)}return s}var s={script:"noscript"};var l=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,p=/([^\\]):hover/g;function d(e){return e.replace(l,function(e,t,r){if(p.test(t)){var n=t.replace(p,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+n.replace(/^\s*/,"")+r}return e})}function m(t,r){switch(t.type){case e.NodeType.Document:return r.implementation.createDocument(null,"",null);case e.NodeType.DocumentType:return r.implementation.createDocumentType(t.name,t.publicId,t.systemId);case e.NodeType.Element:var n=function(e){var t=s[e.tagName]?s[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t),a=void 0;for(var o in a=t.isSVG?r.createElementNS("http://www.w3.org/2000/svg",n):r.createElement(n),t.attributes)if(t.attributes.hasOwnProperty(o)){var u=t.attributes[o];u="boolean"==typeof u?"":u;var c="textarea"===n&&"value"===o,i="style"===n&&"_cssText"===o;if(i&&(u=d(u)),c||i){var l=r.createTextNode(u);a.appendChild(l)}try{a.setAttribute(o,u)}catch(e){}}return a;case e.NodeType.Text:return r.createTextNode(t.isStyle?d(t.textContent):t.textContent);case e.NodeType.CDATA:return r.createCDATASection(t.textContent);case e.NodeType.Comment:return r.createComment(t.textContent);default:return null}}function y(t,r,n,a){void 0===a&&(a=!1);var o=m(t,r);if(!o)return null;if(t.type===e.NodeType.Document&&(r.open(),o=r),o.__sn=t,n[t.id]=o,(t.type===e.NodeType.Document||t.type===e.NodeType.Element)&&!a)for(var u=0,c=t.childNodes;u<c.length;u++){var i=c[u],s=y(i,r,n);s?o.appendChild(s):console.warn("Failed to rebuild",i)}return o}return e.snapshot=function(e){n();var t={};return[i(e,e,t),t]},e.serializeNodeWithId=i,e.resetId=n,e.rebuild=function(e,t){var r={};return[y(e,t,r),r]},e.buildNodeWithSN=y,e}({});
var rrwebSnapshot=function(e){"use strict";var t;(t=e.NodeType||(e.NodeType={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var r=1;function n(){r=1}var a=/url\((['"]|)([^'"]*)\1\)/gm,o=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;function u(e,t){return e.replace(a,function(e,r,n){if(!o.test(n))return"url('"+n+"')";if("/"===n[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+n)+"')";var a,u=t.split("/"),c=n.split("/");u.pop();for(var i=0,s=c;i<s.length;i++){var l=s[i];"."!==l&&(".."===l?u.pop():u.push(l))}return"url('"+u.join("/")+"')"})}function c(e,t){var r=e.createElement("a");return r.href=t,r.href}function i(t,r){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.NodeType.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.NodeType.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:for(var n=t.tagName.toLowerCase(),a={},o=0,i=Array.from(t.attributes);o<i.length;o++){var s=i[o],l=s.name,p=s.value;a[l]="src"===l||"href"===l?c(r,p):p}if("link"===n){var d=Array.from(r.styleSheets).find(function(e){return e.href===t.href}),m=function(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}(d);m&&(a={_cssText:u(m,d.href)})}if("input"===n||"textarea"===n||"select"===n){p=t.value;"radio"!==a.type&&"checkbox"!==a.type&&p?a.value=p:t.checked&&(a.checked=t.checked)}if("option"===n){var y=t.parentElement;a.value===y.value&&(a.selected=t.selected)}return{type:e.NodeType.Element,tagName:n,attributes:a,childNodes:[],isSVG:(v=t,"svg"===v.tagName||v instanceof SVGElement||void 0)};case t.TEXT_NODE:var f=t.parentNode&&t.parentNode.tagName,T=t.textContent,N="STYLE"===f||void 0;return N&&T&&(T=u(T,location.href)),"SCRIPT"===f&&(T="SCRIPT_PLACEHOLDER"),{type:e.NodeType.Text,textContent:T||"",isStyle:N};case t.CDATA_SECTION_NODE:return{type:e.NodeType.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.NodeType.Comment,textContent:t.textContent||""};default:return!1}var v}function s(t,n,a,o){void 0===o&&(o=!1);var u=i(t,n);if(!u)return console.warn(t,"not serialized"),null;var c=Object.assign(u,{id:r++});if(t.__sn=c,a[c.id]=t,(c.type===e.NodeType.Document||c.type===e.NodeType.Element)&&!o)for(var l=0,p=Array.from(t.childNodes);l<p.length;l++){var d=s(p[l],n,a);d&&c.childNodes.push(d)}return c}var l={script:"noscript"};var p=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,d=/([^\\]):hover/g;function m(e){return e.replace(p,function(e,t,r){if(d.test(t)){var n=t.replace(d,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+n.replace(/^\s*/,"")+r}return e})}function y(t,r){switch(t.type){case e.NodeType.Document:return r.implementation.createDocument(null,"",null);case e.NodeType.DocumentType:return r.implementation.createDocumentType(t.name,t.publicId,t.systemId);case e.NodeType.Element:var n=function(e){var t=l[e.tagName]?l[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t),a=void 0;for(var o in a=t.isSVG?r.createElementNS("http://www.w3.org/2000/svg",n):r.createElement(n),t.attributes)if(t.attributes.hasOwnProperty(o)){var u=t.attributes[o];u="boolean"==typeof u?"":u;var c="textarea"===n&&"value"===o,i="style"===n&&"_cssText"===o;if(i&&(u=m(u)),c||i){var s=r.createTextNode(u);a.appendChild(s)}try{a.setAttribute(o,u)}catch(e){}}return a;case e.NodeType.Text:return r.createTextNode(t.isStyle?m(t.textContent):t.textContent);case e.NodeType.CDATA:return r.createCDATASection(t.textContent);case e.NodeType.Comment:return r.createComment(t.textContent);default:return null}}function f(t,r,n,a){void 0===a&&(a=!1);var o=y(t,r);if(!o)return null;if(t.type===e.NodeType.Document&&(r.open(),o=r),o.__sn=t,n[t.id]=o,(t.type===e.NodeType.Document||t.type===e.NodeType.Element)&&!a)for(var u=0,c=t.childNodes;u<c.length;u++){var i=c[u],s=f(i,r,n);s?o.appendChild(s):console.warn("Failed to rebuild",i)}return o}return e.snapshot=function(e){n();var t={};return[s(e,e,t),t]},e.serializeNodeWithId=s,e.resetId=n,e.rebuild=function(e,t){var r={};return[f(e,t,r),r]},e.buildNodeWithSN=f,e}({});
//# sourceMappingURL=rrweb-snapshot.min.js.map

@@ -44,5 +44,6 @@ var NodeType;

var URL_IN_CSS_REF = /url\((['"]|)([^'"]*)\1\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (_1, _2, filePath) {
if (!/^[./]/.test(filePath)) {
if (!RELATIVE_PATH.test(filePath)) {
return "url('" + filePath + "')";

@@ -49,0 +50,0 @@ }

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

var NodeType;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function resetId(){_id=1}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((['"]|)([^'"]*)\1\)/gm;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,r,n){if(!/^[.\/]/.test(n))return"url('"+n+"')";if("/"===n[0])return"url('"+(extractOrigin(t)+n)+"')";var o=t.split("/"),a=n.split("/");o.pop();for(var i=0,u=a;i<u.length;i++){var s=u[i];"."!==s&&(".."===s?o.pop():o.push(s))}return"url('"+o.join("/")+"')"})}function absoluteToDoc(e,t){var r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var r=e.tagName.toLowerCase(),n={},o=0,a=Array.from(e.attributes);o<a.length;o++){var i=a[o],u=i.name,s=i.value;n[u]="src"===u||"href"===u?absoluteToDoc(t,s):s}if("link"===r){var l=Array.from(t.styleSheets).find(function(t){return t.href===e.href}),d=getCssRulesString(l);d&&(n={_cssText:absoluteToStylesheet(d,l.href)})}if("input"===r||"textarea"===r||"select"===r){s=e.value;"radio"!==n.type&&"checkbox"!==n.type&&s?n.value=s:e.checked&&(n.checked=e.checked)}if("option"===r){var c=e.parentElement;n.value===c.value&&(n.selected=e.selected)}return{type:NodeType.Element,tagName:r,attributes:n,childNodes:[],isSVG:isSVGElement(e)||void 0};case e.TEXT_NODE:var p=e.parentNode&&e.parentNode.tagName,N=e.textContent,T="STYLE"===p||void 0;return T&&N&&(N=absoluteToStylesheet(N,location.href)),"SCRIPT"===p&&(N="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:N||"",isStyle:T};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,r,n){void 0===n&&(n=!1);var o=serializeNode(e,t);if(!o)return console.warn(e,"not serialized"),null;var a=Object.assign(o,{id:genId()});if(e.__sn=a,r[a.id]=e,(a.type===NodeType.Document||a.type===NodeType.Element)&&!n)for(var i=0,u=Array.from(e.childNodes);i<u.length;i++){var s=serializeNodeWithId(u[i],t,r);s&&a.childNodes.push(s)}return a}function snapshot(e){resetId();var t={};return[serializeNodeWithId(e,e,t),t]}var tagMap={script:"noscript"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var CSS_SELECTOR=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){return e.replace(CSS_SELECTOR,function(e,t,r){if(HOVER_SELECTOR.test(t)){var n=t.replace(HOVER_SELECTOR,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+n.replace(/^\s*/,"")+r}return e})}function buildNode(e,t){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var r=getTagName(e),n=void 0;for(var o in n=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",r):t.createElement(r),e.attributes)if(e.attributes.hasOwnProperty(o)){var a=e.attributes[o];a="boolean"==typeof a?"":a;var i="textarea"===r&&"value"===o,u="style"===r&&"_cssText"===o;if(u&&(a=addHoverClass(a)),i||u){var s=t.createTextNode(a);n.appendChild(s)}try{n.setAttribute(o,a)}catch(e){}}return n;case NodeType.Text:return t.createTextNode(e.isStyle?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,r,n){void 0===n&&(n=!1);var o=buildNode(e,t);if(!o)return null;if(e.type===NodeType.Document&&(t.open(),o=t),o.__sn=e,r[e.id]=o,(e.type===NodeType.Document||e.type===NodeType.Element)&&!n)for(var a=0,i=e.childNodes;a<i.length;a++){var u=i[a],s=buildNodeWithSN(u,t,r);s?o.appendChild(s):console.warn("Failed to rebuild",u)}return o}function rebuild(e,t){var r={};return[buildNodeWithSN(e,t,r),r]}export{snapshot,serializeNodeWithId,resetId,rebuild,buildNodeWithSN,NodeType};
var NodeType;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function resetId(){_id=1}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((['"]|)([^'"]*)\1\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,r,n){if(!RELATIVE_PATH.test(n))return"url('"+n+"')";if("/"===n[0])return"url('"+(extractOrigin(t)+n)+"')";var o=t.split("/"),a=n.split("/");o.pop();for(var i=0,u=a;i<u.length;i++){var s=u[i];"."!==s&&(".."===s?o.pop():o.push(s))}return"url('"+o.join("/")+"')"})}function absoluteToDoc(e,t){var r=e.createElement("a");return r.href=t,r.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var r=e.tagName.toLowerCase(),n={},o=0,a=Array.from(e.attributes);o<a.length;o++){var i=a[o],u=i.name,s=i.value;n[u]="src"===u||"href"===u?absoluteToDoc(t,s):s}if("link"===r){var l=Array.from(t.styleSheets).find(function(t){return t.href===e.href}),d=getCssRulesString(l);d&&(n={_cssText:absoluteToStylesheet(d,l.href)})}if("input"===r||"textarea"===r||"select"===r){s=e.value;"radio"!==n.type&&"checkbox"!==n.type&&s?n.value=s:e.checked&&(n.checked=e.checked)}if("option"===r){var c=e.parentElement;n.value===c.value&&(n.selected=e.selected)}return{type:NodeType.Element,tagName:r,attributes:n,childNodes:[],isSVG:isSVGElement(e)||void 0};case e.TEXT_NODE:var p=e.parentNode&&e.parentNode.tagName,T=e.textContent,N="STYLE"===p||void 0;return N&&T&&(T=absoluteToStylesheet(T,location.href)),"SCRIPT"===p&&(T="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:T||"",isStyle:N};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,r,n){void 0===n&&(n=!1);var o=serializeNode(e,t);if(!o)return console.warn(e,"not serialized"),null;var a=Object.assign(o,{id:genId()});if(e.__sn=a,r[a.id]=e,(a.type===NodeType.Document||a.type===NodeType.Element)&&!n)for(var i=0,u=Array.from(e.childNodes);i<u.length;i++){var s=serializeNodeWithId(u[i],t,r);s&&a.childNodes.push(s)}return a}function snapshot(e){resetId();var t={};return[serializeNodeWithId(e,e,t),t]}var tagMap={script:"noscript"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var CSS_SELECTOR=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){return e.replace(CSS_SELECTOR,function(e,t,r){if(HOVER_SELECTOR.test(t)){var n=t.replace(HOVER_SELECTOR,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+n.replace(/^\s*/,"")+r}return e})}function buildNode(e,t){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var r=getTagName(e),n=void 0;for(var o in n=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",r):t.createElement(r),e.attributes)if(e.attributes.hasOwnProperty(o)){var a=e.attributes[o];a="boolean"==typeof a?"":a;var i="textarea"===r&&"value"===o,u="style"===r&&"_cssText"===o;if(u&&(a=addHoverClass(a)),i||u){var s=t.createTextNode(a);n.appendChild(s)}try{n.setAttribute(o,a)}catch(e){}}return n;case NodeType.Text:return t.createTextNode(e.isStyle?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,r,n){void 0===n&&(n=!1);var o=buildNode(e,t);if(!o)return null;if(e.type===NodeType.Document&&(t.open(),o=t),o.__sn=e,r[e.id]=o,(e.type===NodeType.Document||e.type===NodeType.Element)&&!n)for(var a=0,i=e.childNodes;a<i.length;a++){var u=i[a],s=buildNodeWithSN(u,t,r);s?o.appendChild(s):console.warn("Failed to rebuild",u)}return o}function rebuild(e,t){var r={};return[buildNodeWithSN(e,t,r),r]}export{snapshot,serializeNodeWithId,resetId,rebuild,buildNodeWithSN,NodeType};
//# sourceMappingURL=rrweb-snapshot.min.js.map

@@ -47,5 +47,6 @@ 'use strict';

var URL_IN_CSS_REF = /url\((['"]|)([^'"]*)\1\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (_1, _2, filePath) {
if (!/^[./]/.test(filePath)) {
if (!RELATIVE_PATH.test(filePath)) {
return "url('" + filePath + "')";

@@ -52,0 +53,0 @@ }

{
"name": "rrweb-snapshot",
"version": "0.6.5",
"version": "0.6.6",
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer",

@@ -43,3 +43,3 @@ "scripts": {

"mocha": "^5.2.0",
"puppeteer": "^1.9.0",
"puppeteer": "^1.10.0",
"rollup": "^0.66.4",

@@ -46,0 +46,0 @@ "rollup-plugin-terser": "^3.0.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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