Skip to main content
Version: 11.2

$.udb(ds).isOnEmbeddedPage()

note

This article is about the isOnEmbeddedPage() function of the DataSourceContainer object.

$.udb(ds).isOnEmbeddedPage()

Detects whether the first data source in the container is on an embedded page, or not.

Returns a boolean.

Syntax

$.udb( *ds* ).isOnEmbeddedPage()

The required ds is a data source selector.

Example

// a data source on an embedded page can't be referenced directly from an
// ancestor page; it needs an explicit data source path instead
let dsc = $.udb('DISCOUNT');

if (dsc.isOnEmbeddedPage()) {
console.log('%s is on an embedded page; use pathTo() to reference it from an ancestor page', dsc.name());
}