Arguments:
Node
Element
Dom
String
Returns: Boolean
Checks if the element is an inline.
let elm = this.app.create('element');
let is = elm.is(el, 'inline');
Checks if the element is a block.
let elm = this.app.create('element');
let is = elm.is(el, 'block');
Checks if the element is an inline or a block (not a text node).
let elm = this.app.create('element');
let is = elm.is(el, 'element');
Arguments:
Node
Element
Dom
Returns: Boolean
Checks if the node or element has empty content.
let elm = this.app.create('element');
let is = elm.isEmpty(el);
Arguments:
Node
Element
Dom
Node
Element
Dom
Returns: Node
Clones the attributes of one element to another. Return the element to which the attributes were cloned.
let elm = this.app.create('element');
let elTo = elmt.cloneAttrs(elFrom, elTo);
Arguments:
Node
Element
Dom
String
Returns: Object
Replaces the tag of passed element to the specified one with cloning all attributes. Returns the wrapped Dom object.
let elm = this.app.create('element');
let $span = elm.replaceToTag(el, 'span');