Element: <oj-bind-dom>

Oracle® JavaScript Extension Toolkit (JET)
8.1.0

F24337-01

Signature:

class ojBindDom<D>

QuickNav

Attributes


Version:
  • 8.1.0
Since:
  • 6.1.0
Module:
  • ojbinddom

Module usage

See JET Module Loading for an overview of module usage within JET.

Typescript Import Format
//To typecheck the element APIs, import as below.
import {ojBindDom} from "ojs/ojbinddom";

//For the transpiled javascript to load the element's module, import as below
import "ojs/ojbinddom";
Generic Parameters
ParameterDescription
DType of data to be provided to the view

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

Dom Binding

Use <oj-bind-dom> to render HTML content and activate optional bindings that will have access to a set of data properties. Note that the <oj-bind-dom> element will be removed from the DOM after bindings are applied. For slotting, applications need to wrap the oj-bind-dom element inside another HTML element (e.g. <span>) with the slot attribute. The oj-bind-dom element does not support the slot attribute.

Attributes

config :(oj.ojBindDom.Config.<D>|Promise.<oj.ojBindDom.Config.<D>>)

Configuration object that defines HTML content to be inserted into the DOM and data to use when applying bindings to this content. The configuration object can be specified either directly or via a Promise.

Type Definitions

Config<D>

Properties:
Name Type Description
view Array.<Node> The Nodes to be inserted. Note that oj-bind-dom does not clone the node array before applying bindings to it. If the application needs to have access to the original node array, it should set the 'view' property to a cloned copy. Node arrays should not have a longer lifespan than their oj-bind-dom element as would be the case for a node array created in the application model and referenced by an oj-bind-dom element that is detached and reattached by another binding element or script.
data D The data available to the view when expressions are evaluated. Note that the oj-bind-dom element's binding context will not be made available.