@ultraq/dom-utils

WebJar for @ultraq/dom-utils

Лицензия

Лицензия

Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

ultraq__dom-utils
Последняя версия

Последняя версия

0.4.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

@ultraq/dom-utils
WebJar for @ultraq/dom-utils
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/ultraq/dom-utils

Скачать ultraq__dom-utils

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ultraq__dom-utils/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ultraq__dom-utils</artifactId>
    <version>0.4.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ultraq__dom-utils/
implementation 'org.webjars.npm:ultraq__dom-utils:0.4.0'
// https://jarcasting.com/artifacts/org.webjars.npm/ultraq__dom-utils/
implementation ("org.webjars.npm:ultraq__dom-utils:0.4.0")
'org.webjars.npm:ultraq__dom-utils:jar:0.4.0'
<dependency org="org.webjars.npm" name="ultraq__dom-utils" rev="0.4.0">
  <artifact name="ultraq__dom-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ultraq__dom-utils', version='0.4.0')
)
libraryDependencies += "org.webjars.npm" % "ultraq__dom-utils" % "0.4.0"
[org.webjars.npm/ultraq__dom-utils "0.4.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

dom-utils

Build Status Coverage Status npm Bundlephobia minified size

A collection of utilities for working with the DOM.

Installation

npm install @ultraq/dom-utils

API

addEventDelegate(element, eventName, selector, handler)

Add an event listener to element that only fires when the target of the event matches selector.

  • element:
  • eventName:
  • selector:
  • handler:

clearChildren(element)

Removes all of an element's child nodes.

  • element

deserialize(htmlString)

Deserialize an HTML string into a document fragment.

  • htmlString

parseJsonFromElement(selector)

Parse the text content of the element picked out by the given selector as JSON data, returning it as an object. Returns null if no data could be read.

  • selector: a CSS selector for picking out the HTML element that contains the JSON data
  • scope: optional, the DOM tree to run the selector over. Defaults to the current document.

serialize(documentOrFragment)

Serialize a document or document fragment into an HTML string.

  • documentOrFragment

Версии библиотеки

Версия
0.4.0
0.3.2
0.1.1