url
string
Load url
content and create a style element to wrap it.
element
HTMLElement
Remove all child element.
element
HTMLElement
Get the index of the element
element
HTMLElement
Get the parent element, it will go through the host if it is a shadow element.
el
HTMLElementparentEL
HTMLElement
Returns the offset {x, y}
from el
to parentEL
el
HTMLElementopts
objectdiveToShadow
booleanexcludeSelf
boolean
cb
function
Recursively search children use depth first algorithm.
element
HTMLElementeventName
stringopts
object
Fires a CustomEvent to the specific element. Example:
Editor.fire(el, 'foobar', {
bubbles: false,
detail: {
value: 'Hello World!'
}
});
event
Event
Call preventDefault and stopImmediatePropagation for the event
element
HTMLElement
Handle mouse down and up event for button like element
el
HTMLElement
Check if the element is in document
el
HTMLElement
Check if the element is in panel
el
HTMLElement
Check if the element is visible by itself
el
HTMLElement
Check if the element is visible in hierarchy
cursor
string - CSS cursorevent
EventonMove
functiononEnd
functiononWheel
function
Start handling element dragging behavior
Cancel dragging element
cursor
string - CSS cursor
Add a dragging mask to keep the cursor not changed while dragging
Remove the dragging mask
cursor
string - CSS cursorzindex
numberonhit
function
Add hit mask
Remove hit mask
options
objectonclick
function
Add loading mask
Remove loading mask
text
string
Convert a string to human friendly text. For example, fooBar
will be Foo bar
text
string
Convert a string to camel case text. For example, foo-bar
will be fooBar
text
string
Convert a string to kebab case text. For example, fooBar
will be foo-bar