Class orion.util
This class contains static utility methods.
Defined in: </shared/eclipse/e4/orion/I201202282230/plugins/org.eclipse.orion.client.core/web/orion/util.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
This class contains static utility methods.
|
Method Attributes | Method Name and Description |
---|---|
followLink(href)
Opens a link in response to some event.
|
|
getText(node)
Returns the text contained by a DOM node.
|
|
isAtRoot()
Determines if the path represents the workspace root
|
|
Opens a dialog near the given DOM node
|
|
openInNewWindow(event)
Returns whether the given event should cause a reference
to open in a new window or not.
|
|
safeText(string)
Escapes HTML in string.
|
Class Detail
orion.util()
This class contains static utility methods. It is not intended to be instantiated.
Method Detail
followLink(href)
Opens a link in response to some event. Whether the link
is opened in the same window or a new window depends on the event
- Parameters:
- {String} href
- The link location
{String}
getText(node)
Returns the text contained by a DOM node.
- Parameters:
- {DomNode} node
- Returns:
- {String} The text contained by node. Note that treatment of whitespace and child nodes is not consistent across browsers.
isAtRoot()
Determines if the path represents the workspace root
openDialog()
Opens a dialog near the given DOM node
openInNewWindow(event)
Returns whether the given event should cause a reference
to open in a new window or not.
- Parameters:
- {Object} event
- The key event
{String}
safeText(string)
Escapes HTML in string. Use this to sanitize user input that is destined for innerHTML.
- Parameters:
- {String} string
- Returns:
- {String} The string with HTML safely escaped.