<?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 &amp;amp;quot;Object #&amp;amp;lt;HTMLDivElement&amp;amp;gt; has no method xxxxxx&amp;amp;quot; error in Chrome in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-object-amp-lt-htmldivelement-amp-gt-has/m-p/543990#M50663</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got this error when activating a custom tool in Chrome. Firefox and IE worked fine. Just thought I'd pass along the cause in case it helps others. In my case I had created a component (ASP.NET user control) that plugs into the web application, and it included some JavaScript. The JavaScript needed to access the Map object on startup, but it couldn't assume the map would be created already. So I added code like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function init() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; // do startup stuff&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setTimeout('init()', 100);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(yes, I know there are better ways to link up the component to the map, but this works for now...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Chrome, my custom tool was throwing a mysterious error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object #&amp;lt;HTMLDivElement&amp;gt; has no method '__resetClickDuration'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It wasn't until I ran into the same issue with a different component with the error of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object #&amp;lt;HTMLDivElement&amp;gt; has no method 'setExtent'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which made me realize it was the map that wasn't working right. I changed the above code so that the map must be loaded first:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map &amp;amp;&amp;amp; map.loaded) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This change held off until "map" was actually loaded as the ESRI Map rather than just pointing to the HTML map &amp;lt;div&amp;gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 23:43:53 GMT</pubDate>
    <dc:creator>BryanBaker</dc:creator>
    <dc:date>2011-07-13T23:43:53Z</dc:date>
    <item>
      <title>&amp;quot;Object #&amp;lt;HTMLDivElement&amp;gt; has no method xxxxxx&amp;quot; error in Chrome</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-object-amp-lt-htmldivelement-amp-gt-has/m-p/543990#M50663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got this error when activating a custom tool in Chrome. Firefox and IE worked fine. Just thought I'd pass along the cause in case it helps others. In my case I had created a component (ASP.NET user control) that plugs into the web application, and it included some JavaScript. The JavaScript needed to access the Map object on startup, but it couldn't assume the map would be created already. So I added code like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function init() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; // do startup stuff&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; setTimeout('init()', 100);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(yes, I know there are better ways to link up the component to the map, but this works for now...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Chrome, my custom tool was throwing a mysterious error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object #&amp;lt;HTMLDivElement&amp;gt; has no method '__resetClickDuration'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It wasn't until I ran into the same issue with a different component with the error of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Object #&amp;lt;HTMLDivElement&amp;gt; has no method 'setExtent'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which made me realize it was the map that wasn't working right. I changed the above code so that the map must be loaded first:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map &amp;amp;&amp;amp; map.loaded) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This change held off until "map" was actually loaded as the ESRI Map rather than just pointing to the HTML map &amp;lt;div&amp;gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 23:43:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-quot-object-amp-lt-htmldivelement-amp-gt-has/m-p/543990#M50663</guid>
      <dc:creator>BryanBaker</dc:creator>
      <dc:date>2011-07-13T23:43:53Z</dc:date>
    </item>
  </channel>
</rss>

