<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic js document.appendChild not working in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/js-document-appendchild-not-working/m-p/170772#M4764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run my app in mobile, I don't want to have my custom widget visible, so I went into the panel.js its tied to and changed this.domNode's style="display: none", and this worked. Now, in my custom widget's widget.js file, I'm trying to create a separate panel that displays some of the information that the custom widget displays when ran on desktop. I'm trying to create it through dynamic javascript (document.createElement('div')), but when I try document.appendChild(mobilepanel), chromes developer tools throws the error that the document can only have 1 element attached to it. Is there any way I can do something like this? I would add more html to the custom widgets widget.html file and just turn its display off an on with flags, but since I changed the this.domNode display to none, i think this will override whatever dynamic html changes in the custom widgets widget.js file.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2018 16:59:25 GMT</pubDate>
    <dc:creator>scottmiller10</dc:creator>
    <dc:date>2018-06-19T16:59:25Z</dc:date>
    <item>
      <title>js document.appendChild not working</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/js-document-appendchild-not-working/m-p/170772#M4764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I run my app in mobile, I don't want to have my custom widget visible, so I went into the panel.js its tied to and changed this.domNode's style="display: none", and this worked. Now, in my custom widget's widget.js file, I'm trying to create a separate panel that displays some of the information that the custom widget displays when ran on desktop. I'm trying to create it through dynamic javascript (document.createElement('div')), but when I try document.appendChild(mobilepanel), chromes developer tools throws the error that the document can only have 1 element attached to it. Is there any way I can do something like this? I would add more html to the custom widgets widget.html file and just turn its display off an on with flags, but since I changed the this.domNode display to none, i think this will override whatever dynamic html changes in the custom widgets widget.js file.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2018 16:59:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/js-document-appendchild-not-working/m-p/170772#M4764</guid>
      <dc:creator>scottmiller10</dc:creator>
      <dc:date>2018-06-19T16:59:25Z</dc:date>
    </item>
  </channel>
</rss>

