Class: Lens.Embed

Lens.Embed allows you to embed a Lens app inside another Lens app. You can then pass messages to the embedded app.

Static Properties

Lens.Embed.parentDispatcher: Dispatcher ARCore/embed.js, line 92

A Dispatcher that allows communication with this app's parent app. Returns null if this app is not embedded.

Static Methods

Lens.Embed.app(name) → {Embed} ARCore/embed.js, line 52

Embeds another Lens app inside this one, given the name of an app.

Argument Type Description
name String

Name of the app, such as scrapbook or look-and-feel.demos

Lens.Embed.iframe(el) → {Embed} ARCore/embed.js, line 77

Connects to a Lens app already running in an iframe.

Argument Type Description
el HTMLIFrameElement | String | jQuery

An iFrame element, CSS selector, or jQuery object.

Lens.Embed.url(name) → {Embed} ARCore/embed.js, line 64

Embeds another Lens app inside this one, given the URL of an app.

Argument Type Description
name String

URL of the app, such as http://launcher.lens/

Instance Properties

iframe: HTMLIFrameElement

The IFrame that contains the embedded app. Insert this into the DOM. Do not use postMessage to send messages to the embedded Lens app. Instead, use the dispatcher for this Embed.

dispatcher: Dispatcher

A Dispatcher that allows for communication between this app and the embedded app.