georgealways/lil-gui

[Howto request]: add onto document

andybru opened this issue · 2 comments

Hello,
your small example:

gui.add( document, 'title' );

how to add something on the 'main' DOM makes me curious.
What else could be made be able to edit on the main DOM-tree?

All the following failed:

gui.add( document, 'body' );
gui.add( document, 'h1' );
gui.add( document, '#test' );

Although 'body' failed differently.

Are there other HTML-elements or ID-elements easily added and then possibly modified?

Could I add for example a list of items (ul>li*) and replace their items?

Thanks for some Information.

Hi there, it seems like your question is more about basic JS functionality rather than this library. I would look at the MDN docs to learn more about the DOM.

Actually I am rather not of this opinion.

With gui.add( document, 'title' ); you also add the <title></title>-tag to the DOM.
What is the lil-GUI reasoning behind this?