constructor (containerPath, startPath, startOffset, endPath, endOffset, reverse, surfaceId) {
    super()

    if (arguments.length === 1) {
      const data = arguments[0]
      containerPath = data.containerPath
      startPath = data.startPath
      startOffset = data.startOffset
      endPath = data.endPath
      endOffset = data.endOffset
      reverse = data.reverse
      surfaceId = data.surfaceId
    }

    /**
      @type {String}
    */
    this.containerPath = containerPath
    if (!this.containerPath) throw new Error('Invalid arguments: `containerPath` is mandatory')

    this.start = new Coordinate(startPath, startOffset)
    this.end = new Coordinate(isNil(endPath) ? startPath : endPath, isNil(endOffset) ? startOffset : endOffset)

    this.reverse = Boolean(reverse)

    this.surfaceId = surfaceId
  }
A selection spanning multiple nodes.


@example

```js
let containerSel = doc.createSelection({
  type: 'container',
  containerPath: 'body',
  startPath: ['p1', 'content'],
  startOffset: 5,
  endPath: ['p3', 'content'],
  endOffset: 4,
})
```