MCPcopy Create free account
hub / github.com/UI5/webcomponents / _startObservingDOMChildren

Function _startObservingDOMChildren

packages/base/src/UI5Element.ts:446–462  ·  view source on GitHub ↗

* @private

()

Source from the content-addressed store, hash-verified

444 * @private
445 */
446 _startObservingDOMChildren() {
447 const ctor = this.constructor as typeof UI5Element;
448 const metadata = ctor.getMetadata();
449 const shouldObserveChildren = metadata.hasSlots();
450
451 if (!shouldObserveChildren) {
452 return;
453 }
454
455 const canSlotText = metadata.canSlotText();
456 const mutationObserverOptions = {
457 childList: true,
458 subtree: canSlotText,
459 characterData: canSlotText,
460 };
461 observeDOMNode(this, this._processChildren.bind(this) as MutationCallback, mutationObserverOptions);
462 }
463
464 /**
465 * @private

Callers

nothing calls this directly

Calls 4

observeDOMNodeFunction · 0.85
getMetadataMethod · 0.80
hasSlotsMethod · 0.80
canSlotTextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…