| Package: | Granite |
| Class: | Util |
| Extends: | Object |
| Clientlib: | <unknown> , * |
| Method | Defined By | |
|---|---|---|
applyDefaults( Object base, Object pass ) : Object <static> Applies default properties if inexistent inzo the base object.
Child objects are merged recursively.
R...
<static> Applies default properties if inexistent inzo the base object.
Child objects are merged recursively.
REMARK:
- objects are recursively merged
- simple type obejct properties are copied over the base
- arrays are cloned and override the base (no value merging)
Parameters:
|
Util | |
getKeyCode( event Event ) : s Get keycode from event
Get keycode from event
Parameters:
|
Util | |
|
getTopWindow() : Window <static> Returns the top most accessible window. Check setIFrameMode to avoid security exception message
on Web...
<static> Returns the top most accessible window. Check setIFrameMode to avoid security exception message
on WebKit browsers if this method is called in an iFrame included in a window from different domain.
Parameters:
|
Util | |
patchText( String text, String/String[] snippets ) : String <static> Replaces occurrences of {n} in the specified text with
the texts from the snippets.
Example 1 (single ...
<static> Replaces occurrences of
{n} in the specified text with
the texts from the snippets.
Example 1 (single snippet): Result 1:
Example 2 (multiple snippets): Result 2:
Parameters:
|
Util | |
setIFrameMode( [Object topWindow] ) : void Allows to define if Granite.Util is running in an iFrame and parent window is in another domain
(and optionally defin...
Allows to define if Granite.Util is running in an iFrame and parent window is in another domain
(and optionally define what would be the top window in that case.
This is necessary to use getTopWindow in a iFrame on WebKit based browsers because
getTopWindow iterates on parent windows to find the top one which triggers a security exception
if one parent window is in a different domain. Exception cannot be caught but is not breaking the JS
execution.
Parameters:
|
Util | |