0.0.5 • Published 2 years ago

@aquaticat/create-element-from-selector v0.0.5

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

createElementFromSelector

Create an HTMLElement from CSS selectors.

Install

One of:

npm

npm install @aquaticat/create-element-from-selector

yarn

yarn add @aquaticat/create-element-from-selector

pnpm

pnpm add @aquaticat/create-element-from-selector

Use

import createElementFromSelector from '@aquaticat/create-element-from-selector';

Profit

Example JavaScript code:

document.body.appendChild(createElementFromSelector('a[autofocus].many.thanks[href="https://aquati.cat"]#Author_of_createElementFromSelector'));

Would result in expected HTML:

<html>
<body>
<a autofocus class="many thanks" href="https://aquati.cat" id="Author_of_createElementFromSelector"></a>
</body>
</html>
0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago