Class CQ.DOM
| Package: | CQ |
| Class: | DOM |
| Extends: | Object |
| Clientlib: | cq.widgets |
A helper class providing a set of DOM-related utilities.
This class is a singleton and cannot be created directly.
Public Properties
This class has no public properties.
Public Methods
| |
clearDocumentSelection( [Window win] ) : void
<static> Clears the text selection in the document. If no window is specified,
the current window will be used.
<static> Clears the text selection in the document. If no window is specified,
the current window will be used.
Parameters:
win : Window(optional) The window
Returns:
Added in CQ 5.3.
|
DOM |
| |
createFullUrl( String absPath ) : String
Creates a full URL (including protocol, host and port) for the specified
absolute path.
Creates a full URL (including protocol, host and port) for the specified
absolute path.
|
DOM |
| |
encodeClass( String str, String prefix ) : String
<static> Encodes the specified string and returns a legal CSS class name. Invalid
characters and the underscore...
<static> Encodes the specified string and returns a legal CSS class name. Invalid
characters and the underscore (which is used as escape character) will be
replaced by "underscore + charCode". If prefix is undefined the class
will be prefixed with "cq". Use "" to avoid prefixing.
Parameters:
str : StringThe string to encode prefix : StringThe prefix
Returns:
|
DOM |
| |
encodeId( String str ) : String
<static> Encodes the specified string and returns a legal HTML id. Invalid
characters and the colon (which is u...
<static> Encodes the specified string and returns a legal HTML id. Invalid
characters and the colon (which is used as escape character) will be
replaced by "colon + charCode".
Parameters:
str : StringThe string to encode
Returns:
|
DOM |
| |
executeScripts( HTMLELement/CQ.Ext.Element element ) : void
<static> Executes the scripts inside the given element.
<static> Executes the scripts inside the given element.
Parameters:
element : HTMLELement/CQ.Ext.ElementThe element
Returns:
|
DOM |
| |
getBlockDefaultStyles() : Object
<static> Returns the default styles of block elements
<static> Returns the default styles of block elements
|
DOM |
| |
prepareForCloning( HTMLElement dom, Boolean deep ) : HTMLElement
Prepares a node (and its ancestor nodes if requested) for cloning if
required.
This method will change the "backgroun...
Prepares a node (and its ancestor nodes if requested) for cloning if
required.
This method will change the "background-image" style property of each node
that consists of an absolute path a full URL for Internet Explorer - which is
required to be able to clone such nodes if https:// is used.
Parameters:
Returns:
HTMLElementThe prepared element
|
DOM |
Public Events
This class has no public events.