Collection of methods for dealing with Framework updates.
- Source:
Methods
-
<static> cancelUpdate()
-
Clears the update error callback, stopping those events from being sent.
- Source:
- See:
-
<static> setErrorCallback(objectName, callbackName)
-
Sets a callback to get progress for a framework update download.
Parameters:
Name Type Argument Default Description objectNameString <optional>
'window' Namespace containing method.
callbackNameString Name of method.
- Source:
- See:
Fires:
Example
OrionUpdate.setErrorCallback('', 'errorCallback'); function errorCallback(event) { if (event.eventName == 'updateErrorEvent') { var code = event.errorCode; // ... } } -
<static> setProgressCallback(objectName, callbackName)
-
Sets a callback to get progress for a framework update download.
Parameters:
Name Type Argument Default Description objectNameString <optional>
'window' Namespace containing method.
callbackNameString Name of method.
Fires:
Example
OrionUpdate.setProgressCallback('', 'progressCallback'); function progressCallback(event) { if (event.eventName == 'updateProgressEvent') { var currentBytes = event.current, totalBytes = event.total; // ... } } -
<static> startUpdate(targetVersion, url)
-
Starts a update check/download. If an update is found, it will begin downloading the update.
Parameters:
Name Type Description targetVersionString Representation of the framework version we are updating to. e.g "2.1.2".
urlString Location to look for the XML file on Mac, or the serverside script on Windows. Pass in a blank string to use the default value.
- Source:
- See:
Example
OrionUpdate.startUpdate('3.4.1', ''); -
<static> unsetErrorCallback()
-
Clears the update error callback, stopping those events from being sent.
- Source:
- See:
-
<static> unsetProgressCallback()
-
Clears the update download progress callback, stopping those events from being sent.
- Source:
- See: