Creating and managing mini-tearoffs.
- Source:
Methods
-
<static> createHiddenTearoffChildFromURL(starletKey, url, title, width, height, borderless)
-
Creates a hidden mini-tearoff from the URL specified.
Parameters:
Name Type Description starletKey
String Framework name of new Starlet.
url
String Location to load into the new WebView.
title
String Display title of new application window.
width
Number Desired width of new application window. Capped at width of screen, 0 will fill width of screen.
height
Number Desired height of new application window. Capped at height of screen, 0 will fill height of screen.
borderless
Boolean Whether to remove GUI chrome from the new application window, leaving only the WebView visible.
- Source:
- See:
Example
OrionTearoffParent.createHiddenTearoffChildFromURL('starlet_key', 'http://www.google.com', 'Google test window', 800, 600, false);
-
<static> createTearoffChildFromURL(starletKey, url, title, width, height, borderless)
-
Creates a mini-tearoff from the URL specified.
Parameters:
Name Type Description starletKey
String Framework name of new Starlet.
url
String Location to load into the new WebView.
title
String Display title of new application window.
width
Number Desired width of new application window. Capped at width of screen, 0 will fill width of screen.
height
Number Desired height of new application window. Capped at height of screen, 0 will fill height of screen.
borderless
Boolean Whether to remove GUI chrome from the new application window, leaving only the WebView visible.
- Source:
- See:
Example
OrionTearoffParent.createTearoffChildFromURL('starlet_key', 'http://www.google.com', 'Google test window', 800, 600, false);
-
<static> messageChild(starletKey, objectName, callbackName, arguments)
-
Calls a javascript function (identified by objectName and functionName), using arguments in the mini-tearoff starlet identified by starletKey. You are only allowed to message the mini-tearoff if you created it.
Parameters:
Name Type Argument Default Description starletKey
String Framework name of Starlet.
objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
arguments
Array:.<(Object:|Array:|String:|Number:|Boolean:)> Parameters to pass to method.
- Source:
- See:
Example
var args = []; args[0] = 'This is a message from the parent starlet'; OrionTearoffParent.messageChild('starlet_key', '', 'messageFromParent', args);
-
<static> setChildClosedCallback(objectName, callbackName)
-
Sets a callback to alert you that the child process has closed.
Parameters:
Name Type Argument Default Description objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
Fires:
Example
OrionTearoffParent.setChildClosedCallback('', 'childClosedCallback'); function childClosedCallback(event) { if (event.eventName == 'childClosed') { var starlet_key = event.key; // ... } }
-
<static> setChildLoadedCallback(objectName, callbackName)
-
Sets a callback to alert you that the child process has loaded. This callback needs to be set before you create a mini-tearoff.
Parameters:
Name Type Argument Default Description objectName
String <optional>
'window' Namespace containing method.
callbackName
String Name of method.
Fires:
Example
OrionTearoffParent.setChildLoadedCallback('', 'childLoadedCallback'); function childLoadedCallback(event) { if (event.eventName == 'childLoaded') { var starlet_key = event.key; // ... } }
-
<static> unsetChildClosedCallback()
-
Clears the child closed callback, stopping those events from being sent.
-
<static> unsetChildLoadedCallback()
-
Clears the child closed callback, stopping those events from being sent.