(item, hooks)
| 16 | */ |
| 17 | class Section { |
| 18 | constructor(item, hooks) { |
| 19 | this.idref = item.idref |
| 20 | this.linear = item.linear === 'yes' |
| 21 | this.properties = item.properties |
| 22 | this.index = item.index |
| 23 | this.href = item.href |
| 24 | this.url = item.url |
| 25 | this.canonical = item.canonical |
| 26 | this.next = item.next |
| 27 | this.prev = item.prev |
| 28 | |
| 29 | this.cfiBase = item.cfiBase |
| 30 | |
| 31 | if (hooks) { |
| 32 | this.hooks = hooks |
| 33 | } else { |
| 34 | this.hooks = {} |
| 35 | this.hooks.serialize = new Hook(this) |
| 36 | this.hooks.content = new Hook(this) |
| 37 | } |
| 38 | |
| 39 | this.document = undefined |
| 40 | this.contents = undefined |
| 41 | this.output = undefined |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Load the section from its url |
nothing calls this directly
no outgoing calls
no test coverage detected