|
||||||||||
| 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.mozilla.MozillaDOMUtils
public class MozillaDOMUtils
Contains methods from DOMUtils that require a different implementation in Mozilla.
| 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 | |
|---|---|
MozillaDOMUtils()
|
|
| Method Summary | |
|---|---|
void |
ensureBlockIsEditable(Element block)
Ensures the given block-level element can be edited in design mode. |
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. |
com.google.gwt.dom.client.Node |
splitHTMLNode(com.google.gwt.dom.client.Node parent,
com.google.gwt.dom.client.Node descendant,
int offset)
Given a subtree specified by its root parent and one of the inner nodes, this method splits the subtree by the path from the given descendant (inner node) to the root parent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MozillaDOMUtils()
| 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 splitHTMLNode(com.google.gwt.dom.client.Node parent,
com.google.gwt.dom.client.Node descendant,
int offset)
DOMUtils.splitNode(Node, Node, int)) does this method ensures that both subtrees are editable in design mode.
This method is required because some browsers like Firefox prevent the user from placing the caret inside empty
block elements such as paragraphs or headers. This empty block elements can be obtained by splitting at the
beginning or at the end of such a block element.
splitHTMLNode in class DOMUtilsparent - the parent node of the subtree's rootdescendant - an inner node within the specified subtreeoffset - the offset within the given descendant. It can be either a character index or a child index
depending on the descendant node type.
DOMUtils.splitHTMLNode(Node, Node, int)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 | |||||||||