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

@stylable/dom-test-kit

Package Overview
Dependencies
Maintainers
6
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/dom-test-kit - npm Package Compare versions

Comparing version 3.5.0 to 3.5.2

2

cjs/index.js

@@ -11,5 +11,5 @@ "use strict";

for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./stylable-dom-util"), exports);
//# sourceMappingURL=index.js.map
{
"name": "@stylable/dom-test-kit",
"version": "3.5.0",
"version": "3.5.2",
"description": "Stylable DOM testing utilities",

@@ -15,4 +15,4 @@ "main": "./cjs/index.js",

"dependencies": {
"@stylable/core": "^3.5.0",
"@stylable/runtime": "^3.5.0"
"@stylable/core": "^3.5.2",
"@stylable/runtime": "^3.5.2"
},

@@ -19,0 +19,0 @@ "files": [

@@ -8,2 +8,3 @@ # @stylable/dom-test-kit

## Example
```css

@@ -14,5 +15,6 @@ /* my-component.st.css */

.part {
-st-states: loading;
-st-states: loading;
}
```
```ts

@@ -34,17 +36,23 @@ /* test.ts */

### `constructor(style: RuntimeStylesheet, root?: Element)`
Initialize the `StylableDOMUtil` by providing a source stylesheet that would function as the base for all testing utilities. You may pass a DOM root element to serve as the default entry point for the `select` methods,
### `select(selector?: string, element?: Element): Element | null`
Select the first `element` in the DOM that matches the provided Stylable `selector`.
### `selectAll(selector?: string, element?: Element): Element[] | null`
Select all `elements` in the DOM that match the provided Stylable `selector`.
### `scopeSelector(selector?: string): string`
Transforms a Stylable `selector` to its target vanilla CSS.
### `hasStyleState(element: Element, stateName: string, param: StateValue = true): boolean`
Check whether the provided `element` has the corresponding state set. This method can also receive a third optional param to validate the state active value.
### `getStyleState(element: Element, stateName: string): string | null`
Get an `element` state value if exists, `null` if it does not.

@@ -51,0 +59,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