Static Properties
-
Lens.Embed.parentDispatcher: Dispatcher ARCore/embed.js, line 92
-
A
Dispatcherthat allows communication with this app's parent app. Returns null if this app is not embedded.
Static Methods
-
Lens.Embed._addPostInitCallback(fn) → {Binding} ARCore/embed.js, line 102
-
Adds a callback to be called on each newly-created embedded lens. This can be used to ensure that all embedded Lenses have access to a particular RPC on the parent.
Returns:Argument Type Description fnfunction The function to call.
A binding that can be cleared to cancel the callback.
-
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 nameString Name of the app, such as
scrapbookorlook-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 elHTMLIFrameElement | 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 nameString 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
postMessageto send messages to the embedded Lens app. Instead, use the dispatcher for this Embed. -
dispatcher: Dispatcher
-
A
Dispatcherthat allows for communication between this app and the embedded app.