Element: <oj-bind-dom>

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

Signature:

class ojBindDom

QuickNav

Attributes


PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

Version:
  • 7.1.0
Since:
  • 6.1.0
Module:
  • ojbinddom

Module usage

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

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 :object|Promise

Configuration object that defines a view and a data available to the oj-bind-dom element. See details for each attribute. The configuration object can be specified either directly or via a Promise.

config.data :Object

Only properties defined in the config.data object will be available to the view when expressions are evaluated. The oj-bind-dom element's binding context will not be made available to the view.

config.view :Array.<Node>

Defines the view for the ojBindDom. Note that oj-bind-dom will not be cloning the node array before applying bindings to it. If the application needs to have access to the original node array, it should be setting 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.