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

@applitools/dom-capture

Package Overview
Dependencies
Maintainers
8
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/dom-capture - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

index.js
const captureDom = require('./src/captureDom');
const mergeCaptures = require('./src/mergeCaptures');
module.exports = {
captureDom,
mergeCaptures,
};

2

package.json
{
"name": "@applitools/dom-capture",
"version": "1.1.0",
"version": "1.2.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -13,2 +13,6 @@ /* global window, document */

function notEmptyObj(obj) {
return Object.keys(obj).length ? obj : undefined;
}
function iframeToJSON(el) {

@@ -39,4 +43,6 @@ const obj = elementToJSON(el);

const attributes = {};
for (const p of attributeProps.all) {
if (el.hasAttribute(p)) attributes[p] = el.getAttribute(p);
if (attributeProps.all) {
for (const p of attributeProps.all) {
if (el.hasAttribute(p)) attributes[p] = el.getAttribute(p);
}
}

@@ -52,5 +58,5 @@

tagName,
style,
rect,
attributes: Object.keys(attributes).length ? attributes : undefined,
style: notEmptyObj(style),
rect: notEmptyObj(rect),
attributes: notEmptyObj(attributes),
childNodes: Array.prototype.map.call(el.childNodes, captureNode).filter(filter),

@@ -57,0 +63,0 @@ };

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