h5o / h5o-js

HTML5 outliner (JavaScript)
MIT License
115 stars 15 forks source link

Get the content of a section #17

Open dominykas opened 10 years ago

dominykas commented 10 years ago

From tae...@gmail.com on November 19, 2012 13:35:54

What steps will reproduce the problem? 1. HTML5Outline(document.body)

  1. Inspect the returned object What is the expected output? What do you see instead? Currently you only get the heading of a section. It would be nice to be able to retrieve the content of a section (what is between this heading and the next one). What version of the product are you using? On what operating system? 0.5.0.62 with Firefox 16.0.2

Original issue: http://code.google.com/p/h5o/issues/detail?id=17

dominykas commented 10 years ago

From tae...@gmail.com on November 19, 2012 03:47:45

Note that you can already do something similar with jQuery : $(outline.sections[0].sections[1].heading).nextUntil(outline.sections[0].sections[2].heading)

dominykas commented 9 years ago

Note: this is essentially what the spec means by "Associate current outline target with current section."

What I haven't figured out yet, is how to actually deal with this, as I do not want to tack on the properties on top of existing elements, plus the outline would need to be updated as the DOM gets updated (meaning elements would need to be added/removed to/from the sections/outlines, etc)

dominykas commented 9 years ago

Note [to self?]: why isn't a currentOutlineTarget getting associated with current section when entering sectioning root, but it is associated when entering sectioning content? Is the parentSection the association, or?... What is the "associated" section of a sectioning root anyways?