happy-dom
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -26,3 +26,3 @@ import Element from '../nodes/basic-types/element/Element'; | ||
/** | ||
* Finds elements based on a query selector. | ||
* Finds elements based on a query selector for a part of a list of selectors separated with comma. | ||
* | ||
@@ -33,5 +33,5 @@ * @param {string} node Node to search in. | ||
*/ | ||
private static singleQuerySelectorAll; | ||
private static querySelectorAllForPart; | ||
/** | ||
* Finds an element based on a query selector. | ||
* Finds an element based on a query selector for a part of a list of selectors separated with comma. | ||
* | ||
@@ -42,3 +42,3 @@ * @param {string} node Node to search in. | ||
*/ | ||
private static singleQuerySelector; | ||
private static querySelectorForPart; | ||
} |
@@ -27,3 +27,3 @@ "use strict"; | ||
var part = _a[_i]; | ||
var foundElements = this.singleQuerySelectorAll(node, part.trim()); | ||
var foundElements = this.querySelectorAllForPart(node, part.trim()); | ||
if (foundElements) { | ||
@@ -45,3 +45,3 @@ matched = matched.concat(foundElements); | ||
var part = _a[_i]; | ||
var foundElement = this.singleQuerySelector(node, part.trim()); | ||
var foundElement = this.querySelectorForPart(node, part.trim()); | ||
if (foundElement) { | ||
@@ -54,3 +54,3 @@ return foundElement; | ||
/** | ||
* Finds elements based on a query selector. | ||
* Finds elements based on a query selector for a part of a list of selectors separated with comma. | ||
* | ||
@@ -61,3 +61,3 @@ * @param {string} node Node to search in. | ||
*/ | ||
QuerySelector.singleQuerySelectorAll = function (node, selector) { | ||
QuerySelector.querySelectorAllForPart = function (node, selector) { | ||
var parts = selector.split(' '); | ||
@@ -85,3 +85,3 @@ var current = new SelectorItem_1.default(parts[0]); | ||
/** | ||
* Finds an element based on a query selector. | ||
* Finds an element based on a query selector for a part of a list of selectors separated with comma. | ||
* | ||
@@ -92,3 +92,3 @@ * @param {string} node Node to search in. | ||
*/ | ||
QuerySelector.singleQuerySelector = function (node, selector) { | ||
QuerySelector.querySelectorForPart = function (node, selector) { | ||
var parts = selector.split(' '); | ||
@@ -95,0 +95,0 @@ var current = new SelectorItem_1.default(parts.shift()); |
{ | ||
"name": "happy-dom", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom#readme", |
@@ -186,3 +186,3 @@ # Happy DOM | ||
By default CSS will be scoped and attached to the head. The most common use case is render the entire document element by running "document.documentElement.outerHTML", which will include the head with the CSS. | ||
By default CSS will be scoped and attached to the head. The most common use case is to render the entire document element by running "document.documentElement.outerHTML", which will include the CSS withinn the head tag. It is also possible to disable this behaviour and manually extract the CSS from "cssCache". | ||
@@ -189,0 +189,0 @@ ## Available Options |
@@ -22,3 +22,3 @@ import Element from '../nodes/basic-types/element/Element'; | ||
for (const part of selector.split(',')) { | ||
const foundElements = this.singleQuerySelectorAll(node, part.trim()); | ||
const foundElements = this.querySelectorAllForPart(node, part.trim()); | ||
if (foundElements) { | ||
@@ -41,3 +41,3 @@ matched = matched.concat(foundElements); | ||
for (const part of selector.split(',')) { | ||
const foundElement = this.singleQuerySelector(node, part.trim()); | ||
const foundElement = this.querySelectorForPart(node, part.trim()); | ||
if (foundElement) { | ||
@@ -51,3 +51,3 @@ return foundElement; | ||
/** | ||
* Finds elements based on a query selector. | ||
* Finds elements based on a query selector for a part of a list of selectors separated with comma. | ||
* | ||
@@ -58,3 +58,3 @@ * @param {string} node Node to search in. | ||
*/ | ||
private static singleQuerySelectorAll(node: Node, selector: string): Element[] { | ||
private static querySelectorAllForPart(node: Node, selector: string): Element[] { | ||
const parts = selector.split(' '); | ||
@@ -82,3 +82,3 @@ const current = new SelectorItem(parts[0]); | ||
/** | ||
* Finds an element based on a query selector. | ||
* Finds an element based on a query selector for a part of a list of selectors separated with comma. | ||
* | ||
@@ -89,3 +89,3 @@ * @param {string} node Node to search in. | ||
*/ | ||
private static singleQuerySelector(node: Node, selector: string): Element { | ||
private static querySelectorForPart(node: Node, selector: string): Element { | ||
const parts = selector.split(' '); | ||
@@ -92,0 +92,0 @@ const current = new SelectorItem(parts.shift()); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
800255