MCPcopy Create free account
hub / github.com/pacexy/flow / constructor

Method constructor

packages/epubjs/src/section.js:18–42  ·  view source on GitHub ↗
(item, hooks)

Source from the content-addressed store, hash-verified

16 */
17class 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected