node_modules/y-codemirror/dist/demo.js
/**
     * Emit `destroy` event and unregister all event handlers.
     */
Emit `destroy` event and unregister all event handlers.
Emit ` destroy ` event and unregister all event handlers .
destroy () {
      from(this.subdocs).forEach(subdoc => subdoc.destroy());
      const item = this._item;
      if (item !== null) {
        this._item = null;
        const content =  (item.content);
        if (item.deleted) {
          content.doc = null;
        } else {
          content.doc = new Doc({ guid: this.guid, ...content.opts });
          content.doc._item = item;
        }
        transact( (item).parent.doc, transaction => {
          if (!item.deleted) {
            transaction.subdocsAdded.add(content.doc);
          }
          transaction.subdocsRemoved.add(this);
        }, null, true);
      }
      this.emit('destroyed', [true]);
      this.emit('destroy', [this]);
      super.destroy();
    }
destroy ( ) { from ( this . subdocs ) . forEach ( subdoc => subdoc . destroy ( ) ) ; const item = this . _item ; if ( item !== null ) { this . _item = null ; const content = ( item . content ) ; if ( item . deleted ) { content . doc = null ; } else { content . doc = new Doc ( { guid : this . guid , ... content . opts } ) ; content . doc . _item = item ; } transact ( ( item ) . parent . doc , transaction => { if ( ! item . deleted ) { transaction . subdocsAdded . add ( content . doc ) ; } transaction . subdocsRemoved . add ( this ) ; } , null , true ) ; } this . emit ( 'destroyed' , [ true ] ) ; this . emit ( 'destroy' , [ this ] ) ; super . destroy ( ) ; }
Emit `destroy` event and unregister all event handlers.
Emit ` destroy ` event and unregister all event handlers .
/** @type {ContentDoc} */ // @ts-ignore /** @type {any} */