(parent: Parent, refBlock: Nullable<Parent> = null)
| 221 | } |
| 222 | |
| 223 | insertInto(parent: Parent, refBlock: Nullable<Parent> = null) { |
| 224 | if (this.parent === parent && this.next === refBlock) |
| 225 | return; |
| 226 | |
| 227 | if (this.parent) |
| 228 | this.parent.removeChild(this); |
| 229 | |
| 230 | // `parent.insertBefore` takes a Parent (the tree's internal linked |
| 231 | // list operates on Parent), but TreeNode.insertInto is also called |
| 232 | // from Content subclasses which extend TreeNode, not Parent. |
| 233 | // eslint-disable-next-line no-restricted-syntax |
| 234 | parent.insertBefore(this as unknown as Parent, refBlock); |
| 235 | } |
| 236 | |
| 237 | /** |
| 238 | * Remove the current block in the block tree. |
no test coverage detected