@ibm-wch-sdk/web-components

Collection of native web-components to work with layouts in Watson Content Hub.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@ibm-wch-sdk/web-components
Minified + gzip package size for @ibm-wch-sdk/web-components in KB

Readme

web-components

Collection of native web components to work with layouts in Watson Content Hub.

Details

Refer to the documentation.

Changes

CHANGELOG

Class documentation

Refer to the documentation.

Usage

Install the library as a dependency to your project, e.g. via:

npm install --save @ibm-wch-sdk/web-components

Bootstrap the registration of the web components as part of the bootstrap process of your application:

import { initSdkComponents } from '@ibm-wch-sdk/web-components';

initSdkComponents();

The components depend on the existence of an implementation of the @ibm-wch-sdk/api in the global namespace. You can use e.g. one of the following implementations:

  • For a standalone application, bootstrap the @ibm-wch-sdk/services implementation.
  • Use the custom components as part of an Angular application.

Build

If you plan to use custom elements natively in the browser, make sure to import the ES6 version of the library. Since the library is packaged following the APF, the ES6 code is available via the es2015 key in the package json. Note that the ES5 implementation will not work in Chrome.

Webpack

When using webpack make the following modification to the webpack.config.js to pull in the ES6 code:

module.exports = {
  resolve: {
    mainFields: ['es2015', 'browser', 'module', 'main']
  }
}

Note how es2015 gets prepended to the default lookup chain.

Layouts

This package of custom web components assist in rendering pages that can be managed by a business user using the WCH UI. The main building blocks are pages and layouts.

Pages

The page structure can be managed in WCH. Each page has a path and points to renderable content.

Use the wch-page component to do the URL resolution and to display the configured content item for a page.

Layouts

Each WCH content item can be rendered using a layout. The business user decides which layout to use for a particular piece of content, the developer implements the layouts as part of the application.

Use the wch-contentref component to render the layout for a particular content item.

Custom layouts

Custom layouts have to be implemented by your application. The layout template as mananaged in WCH matches the name of the custom element. The wch-contentref will figure out which layout is mapped to the addressed content and will instantiate the matching custom element accordingly.

Custom layouts should accept the following attributes:

  • layoutmode: name of the layout mode used to render the component. When not specified this should fallback to default.

Custom layouts should accept the following properties:

  • layoutMode: same as the layoutmode attribute, but accessible as a property. Also note the camel case name.
  • renderingContext: the RenderingContext that identifies the addressed content item. Implementations are advised to use the wch-contentref to render referenced content (or content from search).

Components

The library defines the following web components:

  • wch-contentref: used to render a content item from a reference
  • wch-page: used to do routing according to the WCH configuration

TODO

Changelog

Current

Added

  • Initial version

@ibm-wch-sdk/web-components

Index

External modules


@ibm-wch-sdk/web-components > "base/abstract.base.component"

External module: "base/abstract.base.component"

Index

Classes

Variables


Variables

<Const> ATTR_LAYOUT_MODE

● ATTR_LAYOUT_MODE: string = KEY_LAYOUT_MODE.toLowerCase()

Defined in base/abstract.base.component.ts:16


@ibm-wch-sdk/web-components > "base/abstract.rendering.component"

External module: "base/abstract.rendering.component"

Index

Classes


@ibm-wch-sdk/web-components > "content/content.component"

External module: "content/content.component"

Index

Classes

Variables


Variables

<Const> ATTR_ID

● ATTR_ID: string = KEY_ID.toLowerCase()

Defined in content/content.component.ts:26


<Const> ATTR_LAYOUT_MODE

● ATTR_LAYOUT_MODE: string = KEY_LAYOUT_MODE.toLowerCase()

Defined in content/content.component.ts:28


<Const> ATTR_LEVELS

● ATTR_LEVELS: string = KEY_LEVELS.toLowerCase()

Defined in content/content.component.ts:27


<Const> KEY_ID

● KEY_ID: "id" = "id"

Defined in content/content.component.ts:22


<Const> LOGGER

● LOGGER: "wch-content" = WCH_CONTENT

Defined in content/content.component.ts:24


@ibm-wch-sdk/web-components > "contentref/content.ref.component"

External module: "contentref/content.ref.component"

Index

Classes

Variables

Functions

Object literals


Variables

<Const> LOGGER

● LOGGER: "wch-contentref" = WCH_CONTENT_REF

Defined in contentref/content.ref.component.ts:92


<Const> _DEFAULT_LAYOUT

● _DEFAULT_LAYOUT: "wch-default-layout" = "wch-default-layout"

Defined in contentref/content.ref.component.ts:29


<Const> _PAGE_NOT_FOUND_LAYOUT

● _PAGE_NOT_FOUND_LAYOUT: "wch-404" = "wch-404"

Defined in contentref/content.ref.component.ts:31


Functions

getType

▸ getType(aLayoutMode: string | undefined, aRenderingContext: RenderingContext, aRegistry: CustomElementRegistry): Observable<string>

Defined in contentref/content.ref.component.ts:67

Parameters:

Name Type
aLayoutMode string | undefined
aRenderingContext RenderingContext
aRegistry CustomElementRegistry

Returns: Observable<string>


resolveLayout

▸ resolveLayout(aLayout: Layout, aRegistry: CustomElementRegistry): Observable<string>

Defined in contentref/content.ref.component.ts:42

Parameters:

Name Type
aLayout Layout
aRegistry CustomElementRegistry

Returns: Observable<string>


Object literals

<Const> LAYOUT_NOT_FOUND_LAYOUT

LAYOUT_NOT_FOUND_LAYOUT: object

Defined in contentref/content.ref.component.ts:37

template

● template: string = _DEFAULT_LAYOUT

Defined in contentref/content.ref.component.ts:39


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in contentref/content.ref.component.ts:38



<Const> PAGE_NOT_FOUND_LAYOUT

PAGE_NOT_FOUND_LAYOUT: object

Defined in contentref/content.ref.component.ts:33

template

● template: string = _PAGE_NOT_FOUND_LAYOUT

Defined in contentref/content.ref.component.ts:35


templateType

● templateType: string = LAYOUT_TYPE_ANGULAR

Defined in contentref/content.ref.component.ts:34



@ibm-wch-sdk/web-components > "contentref/index"

External module: "contentref/index"

Index


@ibm-wch-sdk/web-components > "decorators/layout.decorator"

External module: "decorators/layout.decorator"

Index

Variables

Functions


Variables

<Const> LAYOUT_SYMBOL

● LAYOUT_SYMBOL: unique symbol = Symbol()

Defined in decorators/layout.decorator.ts:5


Functions

LayoutComponent

▸ LayoutComponent(aDirective?: LayoutComponentDirective): function

Defined in decorators/layout.decorator.ts:12

Parameters:

Name Type
Optional aDirective LayoutComponentDirective

Returns: function


_getSelectors

▸ _getSelectors(aComponent: any): string[]

Defined in decorators/layout.decorator.ts:32

Returns the selectors for a component

Parameters:

Name Type Description
aComponent any the component

Returns: string[] the selectors, can be the empty strign


registerLayoutComponents

▸ registerLayoutComponents(aComponents: any[]): void

Defined in decorators/layout.decorator.ts:49

Registers the given set of layout components

Parameters:

Name Type Description
aComponents any[] the components

Returns: void


@ibm-wch-sdk/web-components > "decorators/layout.directive"

External module: "decorators/layout.directive"

Index

Interfaces


@ibm-wch-sdk/web-components > "dom/document"

External module: "dom/document"

Index

Variables

Functions


Variables

<Const> createHTMLAbbrElement

● createHTMLAbbrElement: function = _createElement('abbr')

Defined in dom/document.ts:32

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLAddressElement

● createHTMLAddressElement: function = _createElement('address')

Defined in dom/document.ts:34

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLAnchorElement

● createHTMLAnchorElement: function = _createElement('a')

Defined in dom/document.ts:31

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLAppletElement

● createHTMLAppletElement: function = _createElement('applet')

Defined in dom/document.ts:35

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLAreaElement

● createHTMLAreaElement: function = _createElement('area')

Defined in dom/document.ts:36

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLArticleElement

● createHTMLArticleElement: function = _createElement('article')

Defined in dom/document.ts:37

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLAsideElement

● createHTMLAsideElement: function = _createElement('aside')

Defined in dom/document.ts:38

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLAudioElement

● createHTMLAudioElement: function = _createElement('audio')

Defined in dom/document.ts:39

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBElement

● createHTMLBElement: function = _createElement('b')

Defined in dom/document.ts:40

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBaseElement

● createHTMLBaseElement: function = _createElement('base')

Defined in dom/document.ts:41

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBasefontElement

● createHTMLBasefontElement: function = _createElement('basefont')

Defined in dom/document.ts:42

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBdoElement

● createHTMLBdoElement: function = _createElement('bdo')

Defined in dom/document.ts:44

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBlockquoteElement

● createHTMLBlockquoteElement: function = _createElement('blockquote')

Defined in dom/document.ts:46

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBodyElement

● createHTMLBodyElement: function = _createElement('body')

Defined in dom/document.ts:47

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLBrElement

● createHTMLBrElement: function = _createElement('br')

Defined in dom/document.ts:48

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLButtonElement

● createHTMLButtonElement: function = _createElement('button')

Defined in dom/document.ts:49

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLCanvasElement

● createHTMLCanvasElement: function = _createElement('canvas')

Defined in dom/document.ts:50

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLCaptionElement

● createHTMLCaptionElement: function = _createElement('caption')

Defined in dom/document.ts:51

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLCiteElement

● createHTMLCiteElement: function = _createElement('cite')

Defined in dom/document.ts:53

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLCodeElement

● createHTMLCodeElement: function = _createElement('code')

Defined in dom/document.ts:54

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLColElement

● createHTMLColElement: function = _createElement('col')

Defined in dom/document.ts:55

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLColgroupElement

● createHTMLColgroupElement: function = _createElement('colgroup')

Defined in dom/document.ts:56

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDataElement

● createHTMLDataElement: function = _createElement('data')

Defined in dom/document.ts:58

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDatalistElement

● createHTMLDatalistElement: function = _createElement('datalist')

Defined in dom/document.ts:59

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDdElement

● createHTMLDdElement: function = _createElement('dd')

Defined in dom/document.ts:60

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDelElement

● createHTMLDelElement: function = _createElement('del')

Defined in dom/document.ts:61

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDfnElement

● createHTMLDfnElement: function = _createElement('dfn')

Defined in dom/document.ts:63

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDirElement

● createHTMLDirElement: function = _createElement('dir')

Defined in dom/document.ts:65

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDivElement

● createHTMLDivElement: function = _createElement('div')

Defined in dom/document.ts:66

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDlElement

● createHTMLDlElement: function = _createElement('dl')

Defined in dom/document.ts:67

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLDtElement

● createHTMLDtElement: function = _createElement('dt')

Defined in dom/document.ts:68

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLEmElement

● createHTMLEmElement: function = _createElement('em')

Defined in dom/document.ts:69

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLEmbedElement

● createHTMLEmbedElement: function = _createElement('embed')

Defined in dom/document.ts:70

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFieldsetElement

● createHTMLFieldsetElement: function = _createElement('fieldset')

Defined in dom/document.ts:71

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFigcaptionElement

● createHTMLFigcaptionElement: function = _createElement('figcaption')

Defined in dom/document.ts:72

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFigureElement

● createHTMLFigureElement: function = _createElement('figure')

Defined in dom/document.ts:73

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFontElement

● createHTMLFontElement: function = _createElement('font')

Defined in dom/document.ts:74

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFooterElement

● createHTMLFooterElement: function = _createElement('footer')

Defined in dom/document.ts:75

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFormElement

● createHTMLFormElement: function = _createElement('form')

Defined in dom/document.ts:76

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFrameElement

● createHTMLFrameElement: function = _createElement('frame')

Defined in dom/document.ts:77

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLFramesetElement

● createHTMLFramesetElement: function = _createElement('frameset')

Defined in dom/document.ts:78

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLH1Element

● createHTMLH1Element: function = _createElement('h1')

Defined in dom/document.ts:79

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLH2Element

● createHTMLH2Element: function = _createElement('h2')

Defined in dom/document.ts:80

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLH3Element

● createHTMLH3Element: function = _createElement('h3')

Defined in dom/document.ts:81

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLH4Element

● createHTMLH4Element: function = _createElement('h4')

Defined in dom/document.ts:82

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLH5Element

● createHTMLH5Element: function = _createElement('h5')

Defined in dom/document.ts:83

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLH6Element

● createHTMLH6Element: function = _createElement('h6')

Defined in dom/document.ts:84

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLHeadElement

● createHTMLHeadElement: function = _createElement('head')

Defined in dom/document.ts:85

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLHeaderElement

● createHTMLHeaderElement: function = _createElement('header')

Defined in dom/document.ts:86

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLHgroupElement

● createHTMLHgroupElement: function = _createElement('hgroup')

Defined in dom/document.ts:87

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLHrElement

● createHTMLHrElement: function = _createElement('hr')

Defined in dom/document.ts:88

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLHtmlElement

● createHTMLHtmlElement: function = _createElement('html')

Defined in dom/document.ts:89

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLIElement

● createHTMLIElement: function = _createElement('i')

Defined in dom/document.ts:90

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLIframeElement

● createHTMLIframeElement: function = _createElement('iframe')

Defined in dom/document.ts:91

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLImgElement

● createHTMLImgElement: function = _createElement('img')

Defined in dom/document.ts:92

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLInputElement

● createHTMLInputElement: function = _createElement('input')

Defined in dom/document.ts:93

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLInsElement

● createHTMLInsElement: function = _createElement('ins')

Defined in dom/document.ts:94

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLKbdElement

● createHTMLKbdElement: function = _createElement('kbd')

Defined in dom/document.ts:96

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLLabelElement

● createHTMLLabelElement: function = _createElement('label')

Defined in dom/document.ts:98

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLLegendElement

● createHTMLLegendElement: function = _createElement('legend')

Defined in dom/document.ts:99

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLLiElement

● createHTMLLiElement: function = _createElement('li')

Defined in dom/document.ts:100

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLLinkElement

● createHTMLLinkElement: function = _createElement('link')

Defined in dom/document.ts:101

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLMapElement

● createHTMLMapElement: function = _createElement('map')

Defined in dom/document.ts:103

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLMarkElement

● createHTMLMarkElement: function = _createElement('mark')

Defined in dom/document.ts:104

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLMarkeeElement

● createHTMLMarkeeElement: function = _createElement('marquee')

Defined in dom/document.ts:105

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLMenuElement

● createHTMLMenuElement: function = _createElement('menu')

Defined in dom/document.ts:106

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLMetaElement

● createHTMLMetaElement: function = _createElement('meta')

Defined in dom/document.ts:108

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLMeterElement

● createHTMLMeterElement: function = _createElement('meter')

Defined in dom/document.ts:109

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLNavElement

● createHTMLNavElement: function = _createElement('nav')

Defined in dom/document.ts:110

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLNoScriptElement

● createHTMLNoScriptElement: function = _createElement('noscript')

Defined in dom/document.ts:112

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLObjectElement

● createHTMLObjectElement: function = _createElement('object')

Defined in dom/document.ts:113

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLOlElement

● createHTMLOlElement: function = _createElement('ol')

Defined in dom/document.ts:114

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLOptgroupElement

● createHTMLOptgroupElement: function = _createElement('optgroup')

Defined in dom/document.ts:115

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLOptionElement

● createHTMLOptionElement: function = _createElement('option')

Defined in dom/document.ts:116

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLOutputElement

● createHTMLOutputElement: function = _createElement('output')

Defined in dom/document.ts:117

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLPElement

● createHTMLPElement: function = _createElement('p')

Defined in dom/document.ts:118

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLParamElement

● createHTMLParamElement: function = _createElement('param')

Defined in dom/document.ts:119

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLPictureElement

● createHTMLPictureElement: function = _createElement('picture')

Defined in dom/document.ts:120

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLPreElement

● createHTMLPreElement: function = _createElement('pre')

Defined in dom/document.ts:121

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLProgressElement

● createHTMLProgressElement: function = _createElement('progress')

Defined in dom/document.ts:122

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLQElement

● createHTMLQElement: function = _createElement('q')

Defined in dom/document.ts:123

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLRtElement

● createHTMLRtElement: function = _createElement('rt')

Defined in dom/document.ts:125

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLRubyElement

● createHTMLRubyElement: function = _createElement('ruby')

Defined in dom/document.ts:126

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSElement

● createHTMLSElement: function = _createElement('s')

Defined in dom/document.ts:127

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSampElement

● createHTMLSampElement: function = _createElement('samp')

Defined in dom/document.ts:128

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLScriptElement

● createHTMLScriptElement: function = _createElement('script')

Defined in dom/document.ts:129

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSectionElement

● createHTMLSectionElement: function = _createElement('section')

Defined in dom/document.ts:130

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSelectElement

● createHTMLSelectElement: function = _createElement('select')

Defined in dom/document.ts:131

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSmallElement

● createHTMLSmallElement: function = _createElement('small')

Defined in dom/document.ts:132

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSourceElement

● createHTMLSourceElement: function = _createElement('source')

Defined in dom/document.ts:133

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSpanElement

● createHTMLSpanElement: function = _createElement('span')

Defined in dom/document.ts:134

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLStrongElement

● createHTMLStrongElement: function = _createElement('strong')

Defined in dom/document.ts:136

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLStyleElement

● createHTMLStyleElement: function = _createElement('style')

Defined in dom/document.ts:137

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSubElement

● createHTMLSubElement: function = _createElement('sub')

Defined in dom/document.ts:138

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLSupElement

● createHTMLSupElement: function = _createElement('sup')

Defined in dom/document.ts:140

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLTableElement

● createHTMLTableElement: function = _createElement('table')

Defined in dom/document.ts:141

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLTbodyElement

● createHTMLTbodyElement: function = _createElement('tbody')

Defined in dom/document.ts:142

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLTdElement

● createHTMLTdElement: function = _createElement('td')

Defined in dom/document.ts:143

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

Returns: HTMLElementTagNameMap[T]


<Const> createHTMLTemplateElement

● createHTMLTemplateElement: function = _createElement('template')

Defined in dom/document.ts:144

Type declaration

▸(aDoc?: Document): HTMLElementTagNameMap[T]

Parameters:

Name Type
Optional aDoc Document

**Return

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.