| Package: | CQ.shared |
| Class: | Util |
| Extends: | Object |
| Clientlib: | cq.shared |
| Property | Defined By | |
|---|---|---|
|
getTopWindow : Object
<static> Returns the top most accessible window. Added in CQ 5.5.
|
Util | |
|
patchText : Object <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: |
Util | |
|
setIFrameMode : Object 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.
|
Util | |
| Method | Defined By | |
|---|---|---|
ellipsis( String value, Number length, Boolean word ) : String Truncates a string and add an ellipsis ('...') to the end if it exceeds the specified length
Truncates a string and add an ellipsis ('...') to the end if it exceeds the specified length
Parameters:
|
Util | |
eval( Object response ) : Object Deprecated: Use CQ.shared.HTTP.eval instead
<static> Evaluates and returns the response text of the specified response
object.
<static> Evaluates and returns the response text of the specified response
object.
Parameters:
|
Util | |
htmlDecode( String value ) : String Converts certain characters (&, <, >, and ") from their HTML character equivalents.
Converts certain characters (&, <, >, and ") from their HTML character equivalents.
Parameters:
|
Util | |
htmlEncode( String value ) : String Converts certain characters (&, <, >, and ") to their HTML character equivalents for literal display in web pages.
Converts certain characters (&, <, >, and ") to their HTML character equivalents for literal display in web pages.
Parameters:
|
Util | |
load( String url, [String preventHistory] ) : void <static> Loads the specified URL in the current window.
<static> Loads the specified URL in the current window.
Parameters:
|
Util | |
open( String url, [Window win], [String name], [String options] ) : Object <static> Opens a new window with the specified URL.
If no window is specified, the current window will be used.
<static> Opens a new window with the specified URL.
If no window is specified, the current window will be used.
Parameters:
|
Util | |
reload( [Window win], [String url], [String preventHistory] ) : void <static> Reloads the window or replaces its location with the specified URL.
If no window is specified, the cur...
<static> Reloads the window or replaces its location with the specified URL.
If no window is specified, the current window will be used.
Parameters:
|
Util | |