bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null

bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null

bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null

bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null

bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null

bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null

bindings/dom

Classes

DomBinding

Methods

static defaultFilter(nodeName, attrs) → {Map|null}

Default filter method (does nothing).

Parameters:
Name Type Description
nodeName String

The nodeName of the element

attrs Map

Map of key-value pairs that are attributes of the node.

Returns:
Map | null -

The allowed attributes or null, if the element should be filtered.

static domToType(element, _documentnullable, hooksopt, filteropt, bindingnullable) → {YXmlElement|YXmlText|false}

Creates a Yjs type (YXml) based on the contents of a DOM Element.

Parameters:
Name Type Attributes Default Description
element Element | Text

The DOM Element

_document Document <nullable>

Optional. Provide the global document object

hooks Object.<string, any> <optional>
{}

Optional. Set of Yjs Hooks

filter DomFilter <optional>
defaultFilter

Optional. Dom element filter

binding DomBinding <nullable>

Warning: This property is for internal use only!

Returns:
YXmlElement | YXmlText | false

Type Definitions

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

DomFilter(nodeName, attrs) → {Map|null}

Parameters:
Name Type Description
nodeName string
attrs Map.<string, string>
Returns:
Map | null

FilterFunction(nodeName, attrs) → {Map|null}

A filter defines which elements and attributes to share. Return null if the node should be filtered. Otherwise return the Map of accepted attributes.

Parameters:
Name Type Description
nodeName string
attrs Map
Returns:
Map | null