Element: <oj-bind-dom>

Oracle® JavaScript Extension Toolkit (JET)


  • 6.1.0
  • ojbinddom



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.

Note, the oj-bind-dom element does not validate HTML input provided by an application for integrity or security violations. It is the application's responsibility to sanitize the input to prevent unsafe content from being added to the page.



interface BindDomElement<D>

Generic Parameters
DType of data to be provided to the view
Typescript Import Format
//To typecheck the element APIs, import as below.
import {BindDomElement} from "ojs/ojbinddom";

//For the transpiled javascript to load the element's module, import as below
import "ojs/ojbinddom";

For additional information visit:


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


Name Type Description
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.
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.