|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.dom.client.DOMUtils
org.xwiki.gwt.dom.client.internal.ie.IEDOMUtils
public class IEDOMUtils
Contains methods from DOMUtils that require a different implementation in Internet Explorer.
| Field Summary |
|---|
| Fields inherited from class org.xwiki.gwt.dom.client.DOMUtils |
|---|
CDATA_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, HTML_BLOCK_LEVEL_INLINE_CONTAINERS, HTML_EMPTY_TAGS, HTML_FLOW_CONTAINERS, HTML_SPECIAL_BLOCK_LEVEL_ELEMENTS, UNSUPPORTED_NODE_TYPE |
| Constructor Summary | |
|---|---|
IEDOMUtils()
|
|
| Method Summary | |
|---|---|
void |
ensureBlockIsEditable(Element block)
Ensures the given block-level element can be edited in design mode. |
java.lang.String |
getAttribute(Element element,
java.lang.String name)
Returns the value of the named attribute of the specified element. |
com.google.gwt.core.client.JsArrayString |
getAttributeNames(Element element)
|
java.lang.String |
getComputedStyleProperty(Element el,
java.lang.String propertyName)
Returns the value of the specified CSS property for the given element as it is computed by the browser before it displays that element. |
java.lang.String |
getInnerText(Element element)
We need our own implementation because the one provided by GWT includes commented text in the output. |
boolean |
hasAttribute(Element element,
java.lang.String attrName)
|
boolean |
hasAttributes(Element element)
|
com.google.gwt.dom.client.Node |
importNode(Document doc,
com.google.gwt.dom.client.Node externalNode,
boolean deep)
Creates a copy of a node from an external document that can be inserted into the given document. |
void |
setAttribute(Element element,
java.lang.String name,
java.lang.String value)
Sets the value of the specified attribute for the given element. |
void |
setInnerHTML(Element element,
java.lang.String html)
Helps setting the inner HTML for an element, in a cross-browser manner, because IE seems to trim leading comments in the inner HTML. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IEDOMUtils()
| Method Detail |
|---|
public java.lang.String getComputedStyleProperty(Element el,
java.lang.String propertyName)
fontWeight) and it is used like this object.style.propertyJSName = value. The CSS
name has dash style (font-weight) and it is used like this propertyCSSName: value;.
getComputedStyleProperty in class DOMUtilsel - the element for which we retrieve the property value.propertyName - the script name of the CSS property whose value is returned.
DOMUtils.getComputedStyleProperty(Element, String)
public com.google.gwt.dom.client.Node importNode(Document doc,
com.google.gwt.dom.client.Node externalNode,
boolean deep)
importNode in class DOMUtilsdoc - The document in which we want to insert the returned copy.externalNode - The node from another document to be imported.deep - Indicates whether the children of the given node need to be imported.
DOMUtils.importNode(Document, Node, boolean)public com.google.gwt.core.client.JsArrayString getAttributeNames(Element element)
getAttributeNames in class DOMUtilselement - The DOM element whose attribute names are returned.
DOMUtils.getAttributeNames(Element)
public void setInnerHTML(Element element,
java.lang.String html)
setInnerHTML in class DOMUtilselement - element to set the inner HTML forhtml - the HTML string to setDOMUtils.setInnerHTML(Element, String),
http://code.google.com/p/google-web-toolkit/issues/detail?id=3146
public java.lang.String getAttribute(Element element,
java.lang.String name)
getAttribute in class DOMUtilselement - the element to get the attribute forname - the name of the attribute to return
DOMUtils.getAttribute(Element, String)
public void setAttribute(Element element,
java.lang.String name,
java.lang.String value)
setAttribute in class DOMUtilselement - the element whose attribute is setname - the name of the attributevalue - the value of the attributeDOMUtils.setAttribute(Element, String, String)public java.lang.String getInnerText(Element element)
getInnerText in class DOMUtilselement - the element whose inner text to return
DOMUtils.getInnerText(Element)
public boolean hasAttribute(Element element,
java.lang.String attrName)
hasAttribute in class DOMUtilselement - a DOM elementattrName - a string representing the name of an attribute
DOMUtils.hasAttribute(Element, String)public boolean hasAttributes(Element element)
hasAttributes in class DOMUtilselement - a DOM element
true if the given element has any attributesDOMUtils.hasAttributes(Element)public void ensureBlockIsEditable(Element block)
ensureBlockIsEditable in class DOMUtilsblock - a block-level DOM elementDOMUtils.ensureBlockIsEditable(Element)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||