implement prev/nextSibling&firstChild & parent - #259

This commit is contained in:
Kevin Jahns
2020-11-14 13:33:43 +01:00
parent 0aca7bbefa
commit 1ed58909d3
6 changed files with 83 additions and 2 deletions

View File

@@ -130,6 +130,14 @@ export class YXmlFragment extends AbstractType {
this._prelimContent = []
}
/**
* @type {YXmlElement|YXmlText|null}
*/
get firstChild () {
const first = this._first
return first ? first.content.getContent()[0] : null
}
/**
* Integrate this type into the Yjs instance.
*