0

I would like to include into a <td class="body_content"> a DAT.Gui menu. For this, I did :

// Create GUI
var gui = new dat.GUI({
 autoplace: false, 
    width: 350, 
    height: 15 * 32 - 1
});

var elementBodyContent = document.getElementsByClassName('body_content')[0];
elementBodyContent.appenChild(gui.domElement);

Unfortunately, I get the following error (on the last line above) :

TypeError: elementBodyContent.appenChild is not a function

I don't know how to circumvent this issue : is gui a valid DOM Element ?

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Hint: if the error message says that `x` is not a function, then double-check what `x` is before you go looking for other issues... (The error you are getting has nothing to do with `gui.domElement`.) – nnnnnn Apr 01 '17 at 07:02
  • I see you've edited the question, but you don't seem to have followed up on my hint. Do I have to *spell* it out? – nnnnnn Apr 01 '17 at 08:42
  • like always, typo error with appendChild, sorry for all this stuff –  Apr 01 '17 at 09:16
  • This question can be closed as "Typo/Not Repro". – halfer Nov 06 '21 at 00:19

0 Answers0