MCPcopy
hub / github.com/yjs/yjs / _callObserver

Method _callObserver

src/ytype.js:720–730  ·  view source on GitHub ↗

* Creates YEvent and calls all type observers. * Must be implemented by each type. * * @param {Transaction} transaction * @param {Set } parentSubs Keys changed on this type. `null` if list was modified.

(transaction, parentSubs)

Source from the content-addressed store, hash-verified

718 * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
719 */
720 _callObserver (transaction, parentSubs) {
721 const event = new YEvent(/** @type {any} */ (this), transaction, parentSubs)
722 callTypeObservers(/** @type {any} */ (this), transaction, event)
723 if (!transaction.local && this._searchMarker) {
724 this._searchMarker.length = 0
725 }
726 // If a remote change happened, we try to cleanup potential formatting duplicates.
727 if (!transaction.local && this._hasFormatting) {
728 transaction._needFormattingCleanup = true
729 }
730 }
731
732 /**
733 * Observe all events that are created on this type.

Callers 1

cleanupTransactionsFunction · 0.80

Calls 1

callTypeObserversFunction · 0.85

Tested by

no test coverage detected