mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-26 21:39:37 -04:00
js: add index attribute to heading object
This commit is contained in:
parent
0f4c154685
commit
61218ada6d
@ -31,9 +31,10 @@ function TableOfContents () {
|
||||
|
||||
this.headerObjects = this.getHeaderObjects();
|
||||
|
||||
function elementToObject(element) {
|
||||
function elementToObject(element, index) {
|
||||
var obj = {};
|
||||
obj.id = element.id;
|
||||
obj.index = index;
|
||||
obj.textContent = element.textContent;
|
||||
obj.tagName = element.tagName;
|
||||
return obj;
|
||||
|
Loading…
x
Reference in New Issue
Block a user