MCPcopy
hub / github.com/tinymce/tinymce / hasClass

Function hasClass

modules/tinymce/src/core/main/ts/api/dom/DOMUtils.ts:824–830  ·  view source on GitHub ↗
(elm: string | Element, cls: string)

Source from the content-addressed store, hash-verified

822 };
823
824 const hasClass = (elm: string | Element, cls: string) => {
825 const $elm = _get(elm);
826 // TINY-4520: DomQuery used to handle specifying multiple classes and the
827 // formatter relies on it due to the changes made for TINY-7227
828 const classes = cls.split(' ');
829 return Type.isNonNullable($elm) && Arr.forall(classes, (c) => Class.has($elm, c));
830 };
831
832 const show = (elm: string | Node | Node[]) => {
833 run(elm, (e) => Css.remove(SugarElement.fromDom(e), 'display'));

Callers

nothing calls this directly

Calls 3

_getFunction · 0.85
forallMethod · 0.80
hasMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…