Skip to main content

Module: @divine/x4e

Namespaces

Interfaces

References

escapeXML

Renames and re-exports escapeHTML


escapeXMLAttribute

Renames and re-exports escapeHTMLAttribute

Type Aliases

JSX_Attributes

Ƭ JSX_Attributes: Record<string, unknown>

Defined in

x4e/src/jsx.ts:18


JSX_ComponentResult

Ƭ JSX_ComponentResult: JSX_Element | null | undefined

Defined in

x4e/src/jsx.ts:19


XML

Ƭ XML<TNode>: _XML<TNode>

Type parameters

NameType
TNodeextends Node

Defined in

x4e/src/x4e.ts:7

x4e/src/x4e.ts:8


XMLList

Ƭ XMLList<TNode>: _XMLList<TNode>

Type parameters

NameType
TNodeextends Node

Defined in

x4e/src/x4e.ts:15

x4e/src/x4e.ts:16

Variables

NS_ATOM

Const NS_ATOM: "http://www.w3.org/2005/Atom"

Defined in

x4e/src/xml-utils.ts:5


NS_DEFAULT

Const NS_DEFAULT: ""

Defined in

x4e/src/xml-utils.ts:3


NS_SOAP

Const NS_SOAP: "http://www.w3.org/2003/05/soap-envelope"

Defined in

x4e/src/xml-utils.ts:6


NS_WDSL

Const NS_WDSL: "http://www.w3.org/ns/wsdl"

Defined in

x4e/src/xml-utils.ts:7


NS_XHTML

Const NS_XHTML: "http://www.w3.org/1999/xhtml"

Defined in

x4e/src/xml-utils.ts:4


Const NS_XLINK: "http://www.w3.org/1999/xlink"

Defined in

x4e/src/xml-utils.ts:8


NS_XMLSCHEMA

Const NS_XMLSCHEMA: "http://www.w3.org/2001/XMLSchema"

Defined in

x4e/src/xml-utils.ts:9


NS_XSLT

Const NS_XSLT: "http://www.w3.org/1999/XSL/Transform"

Defined in

x4e/src/xml-utils.ts:10

Functions

XML

XML(source?): XML<Text>

Parameters

NameType
source?null

Returns

XML<Text>

Defined in

x4e/src/x4e-types.ts:26

XML<TNode>(source): XML<TNode>

Type parameters

NameType
TNodeextends Node

Parameters

NameType
sourceTNode | XML<TNode> | XMLList<TNode>

Returns

XML<TNode>

Defined in

x4e/src/x4e-types.ts:29

XML<TNode>(source, defaultNamespace?): XML<TNode>

Type parameters

NameType
TNodeextends Node = Node

Parameters

NameType
sourceundefined | null | ConvertableTypes
defaultNamespace?string

Returns

XML<TNode>

Defined in

x4e/src/x4e-types.ts:32


XMLList

XMLList<TNode>(source): XMLList<TNode>

Type parameters

NameType
TNodeextends Node

Parameters

NameType
sourceTNode | ArrayLike<TNode> | XML<TNode> | XMLList<TNode>

Returns

XMLList<TNode>

Defined in

x4e/src/x4e-types.ts:41

XMLList<TNode>(source, defaultNamespace?): XMLList<TNode>

Type parameters

NameType
TNodeextends Node = Node

Parameters

NameType
sourceundefined | null | ConvertableTypes | ArrayLike<Node>
defaultNamespace?string

Returns

XMLList<TNode>

Defined in

x4e/src/x4e-types.ts:44


createJSXElement

createJSXElement<T>(tagName, namespaceURI, props, ...children): JSX_Element

Type parameters

NameType
Textends JSX_Attributes

Parameters

NameType
tagNameJSX_TagName<T>
namespaceURInull | string
propsnull | T
...childrenJSX_Children

Returns

JSX_Element

Defined in

x4e/src/jsx.ts:59


escapeHTML

escapeHTML(value): string

Parameters

NameType
valuestring

Returns

string

Defined in

x4e/src/xml-utils.ts:106


escapeHTMLAttribute

escapeHTMLAttribute(value): string

Parameters

NameType
valuestring

Returns

string

Defined in

x4e/src/xml-utils.ts:110


html

html(strings, ...values): XML<Element>

Parameters

NameType
stringsTemplateStringsArray
...valuesunknown[]

Returns

XML<Element>

Defined in

x4e/src/literals.ts:23


htmlList

htmlList<TNode>(strings, ...values): XMLList<TNode>

Type parameters

NameType
TNodeextends Node = Node

Parameters

NameType
stringsTemplateStringsArray
...valuesunknown[]

Returns

XMLList<TNode>

Defined in

x4e/src/literals.ts:27


isAttribute

isAttribute(node): node is Attr

Parameters

NameType
nodeNode

Returns

node is Attr

Defined in

x4e/src/xml-utils.ts:130


isComment

isComment(node): node is Comment

Parameters

NameType
nodeNode

Returns

node is Comment

Defined in

x4e/src/xml-utils.ts:142


isDOMNode

isDOMNode(obj): obj is Node

Parameters

NameType
objunknown

Returns

obj is Node

Defined in

x4e/src/xml-utils.ts:122


isDocument

isDocument(node): node is Document

Parameters

NameType
nodeNode

Returns

node is Document

Defined in

x4e/src/xml-utils.ts:146


isDocumentFragment

isDocumentFragment(node): node is DocumentFragment

Parameters

NameType
nodeNode

Returns

node is DocumentFragment

Defined in

x4e/src/xml-utils.ts:154


isDocumentType

isDocumentType(node): node is DocumentType

Parameters

NameType
nodeNode

Returns

node is DocumentType

Defined in

x4e/src/xml-utils.ts:150


isElement

isElement(node): node is Element

Parameters

NameType
nodeNode

Returns

node is Element

Defined in

x4e/src/xml-utils.ts:126


isEqualNode

isEqualNode(n1, n2, x4eMode): boolean

Parameters

NameType
n1Node
n2undefined | null | Node
x4eModeboolean

Returns

boolean

Defined in

x4e/src/xml-utils.ts:78


isProcessingInstruction

isProcessingInstruction(node): node is ProcessingInstruction

Parameters

NameType
nodeNode

Returns

node is ProcessingInstruction

Defined in

x4e/src/xml-utils.ts:138


isText

isText(node): node is Text

Parameters

NameType
nodeNode

Returns

node is Text

Defined in

x4e/src/xml-utils.ts:134


parseHTMLFragmentFromString

parseHTMLFragmentFromString(fragment): DocumentFragment

Parameters

NameType
fragmentstring

Returns

DocumentFragment

Defined in

x4e/src/html-utils.ts:15


parseHTMLFromString

parseHTMLFromString(document): Document

Parameters

NameType
documentstring

Returns

Document

Defined in

x4e/src/html-utils.ts:11


parseXMLFromString

parseXMLFromString(document): Document

Parameters

NameType
documentstring

Returns

Document

Defined in

x4e/src/xml-utils.ts:114


serializeHTMLToString

serializeHTMLToString(node): string

Parameters

NameType
nodeNode

Returns

string

Defined in

x4e/src/html-utils.ts:19


serializeXMLToString

serializeXMLToString(node): string

Parameters

NameType
nodeNode

Returns

string

Defined in

x4e/src/xml-utils.ts:118


xhtml

xhtml<TNode>(strings, ...values): XML<TNode>

Type parameters

NameType
TNodeextends Node = Element

Parameters

NameType
stringsTemplateStringsArray
...valuesunknown[]

Returns

XML<TNode>

Defined in

x4e/src/literals.ts:8


xhtmlList

xhtmlList<TNode>(strings, ...values): XMLList<TNode>

Type parameters

NameType
TNodeextends Node = Node

Parameters

NameType
stringsTemplateStringsArray
...valuesunknown[]

Returns

XMLList<TNode>

Defined in

x4e/src/literals.ts:9


xml

xml<TNode>(strings, ...values): XML<TNode>

Type parameters

NameType
TNodeextends Node = Element

Parameters

NameType
stringsTemplateStringsArray
...valuesunknown[]

Returns

XML<TNode>

Defined in

x4e/src/literals.ts:8


xmlList

xmlList<TNode>(strings, ...values): XMLList<TNode>

Type parameters

NameType
TNodeextends Node = Node

Parameters

NameType
stringsTemplateStringsArray
...valuesunknown[]

Returns

XMLList<TNode>

Defined in

x4e/src/literals.ts:9


xmlListNS

xmlListNS(defaultNamespace): XMLListLiteral

Parameters

NameType
defaultNamespacestring

Returns

XMLListLiteral

Defined in

x4e/src/literals.ts:17


xmlNS

xmlNS(defaultNamespace): XMLLiteral

Parameters

NameType
defaultNamespacestring

Returns

XMLLiteral

Defined in

x4e/src/literals.ts:11