New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@qualweb/qw-element

Package Overview
Dependencies
Maintainers
4
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qualweb/qw-element - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

7

CHANGELOG.md
# Changelog
## [0.2.2] - 25/03/2021
### Changes
- general bugs fixed
## [0.2.1] - 25/03/2021

@@ -4,0 +11,0 @@

20

dist/index.js

@@ -106,4 +106,4 @@ "use strict";

elementHasParent(parent) {
const parentElement = this.element['parentElement'];
return parentElement ? parentElement['tagName'].toLowerCase() === parent.toLowerCase() : false;
const parentElement = this.element.parentElement;
return parentElement ? parentElement.tagName.toLowerCase() === parent.toLowerCase() : false;
}

@@ -137,6 +137,5 @@ hasTextNode() {

getElementChildren() {
const selector = this.getElementSelector();
const qwList = new Array();
const elements = this.element.querySelectorAll(selector + ' > *');
for (const element of elements || []) {
const elements = this.element.children;
for (const element of elements !== null && elements !== void 0 ? elements : []) {
this.addCSSRulesPropertyToElement(element);

@@ -148,5 +147,6 @@ qwList.push(new QWElement(element, this.elementsCSSRules));

getElementChildTextContent(childName) {
var _a;
for (const child of this.element.children || []) {
if (child.tagName.toLowerCase() === childName.toLowerCase()) {
return child['textContent'] || undefined;
return (_a = child.textContent) !== null && _a !== void 0 ? _a : undefined;
}

@@ -165,4 +165,3 @@ }

if (fullElement) {
const selector = this.getElementSelector();
const children = this.element.querySelectorAll(selector + ' *');
const children = this.element.children;
const attributeArray = new Array();

@@ -236,3 +235,3 @@ for (const child of children) {

const qwList = new Array();
for (const element of elements || []) {
for (const element of elements !== null && elements !== void 0 ? elements : []) {
this.addCSSRulesPropertyToElement(element);

@@ -326,3 +325,3 @@ qwList.push(new QWElement(element, this.elementsCSSRules));

getElementTagName() {
return this.element['tagName'].toLowerCase();
return this.element.tagName.toLowerCase();
}

@@ -337,3 +336,2 @@ getElementText() {

}
console.log(children);
let result = '';

@@ -340,0 +338,0 @@ let textContent;

{
"name": "@qualweb/qw-element",
"version": "0.2.1",
"version": "0.2.2",
"description": "QualWeb element interface and utilities",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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