projects/m2-core/src/lib/core/utils/dom.utils.ts
Methods |
|
| Static appendStylesheet | ||||||
appendStylesheet(href: string)
|
||||||
|
Parameters :
Returns :
void
|
| Static getClosestParent | |||||||||
getClosestParent(element: HTMLElement, predicate: (p: HTMLElement) => void)
|
|||||||||
|
Parameters :
Returns :
HTMLElement | null
|
| Static getClosestParentWithOverflow | ||||||
getClosestParentWithOverflow(element: HTMLElement)
|
||||||
|
Parameters :
Returns :
HTMLElement
|
| Static isChild | ||||||
isChild(elem, potentialParent)
|
||||||
|
Parameters :
Returns :
boolean
true if elem is child of potentialParent or the potentialParent itself. |
| Static isElementFocused | ||||||
isElementFocused(element: HTMLElement)
|
||||||
|
{boolean} TRUE in case element or its child is focused
Parameters :
Returns :
boolean
|
| Static removeElement | ||||||
removeElement(elem: HTMLElement)
|
||||||
|
Parameters :
Returns :
void
|
| Static removeStylesheet | ||||||
removeStylesheet(path: string)
|
||||||
|
Parameters :
Returns :
void
|
| Static restoreSelection | |||||||||
restoreSelection(contentEditableElem: HTMLElement, savedSelection: TextSelection)
|
|||||||||
|
Restore selection https://stackoverflow.com/questions/13949059/persisting-the-changes-of-range-objects-after-selection-in-html/13950376#13950376
Parameters :
Returns :
void
|
| Static saveSelection | ||||||
saveSelection(contentEditableElem: HTMLElement)
|
||||||
|
Save selection https://stackoverflow.com/questions/13949059/persisting-the-changes-of-range-objects-after-selection-in-html/13950376#13950376
Parameters :
Returns :
TextSelection
|
| Static setCaretAtEnd | ||||||
setCaretAtEnd(contentEditableElem: HTMLElement)
|
||||||
|
Parameters :
Returns :
void
|