<?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 Re: Using promises as popupTemplate content in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144928#M13502</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool, thanks for your answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 May 2018 05:58:33 GMT</pubDate>
    <dc:creator>KevinHaeni</dc:creator>
    <dc:date>2018-05-01T05:58:33Z</dc:date>
    <item>
      <title>Using promises as popupTemplate content</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144926#M13500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the documentation, it should be possible to use promises with popupTemplates:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;const template = {&lt;/P&gt;&lt;P&gt;&amp;nbsp; title: 'Title',&lt;/P&gt;&lt;P&gt;&amp;nbsp; content: new Promise(function(res, rej) { res('test');}),&lt;BR /&gt; }; &lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var featureLayer = new FeatureLayer({&lt;BR /&gt;&amp;nbsp; &amp;nbsp;url: url,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;popupTemplate: template&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, with 4.7 this results in the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Uncaught (in promise) TypeError: a.isFulfilled is not a function&lt;BR /&gt; at Object.get (MapView.js:143)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 10:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144926#M13500</guid>
      <dc:creator>KevinHaeni</dc:creator>
      <dc:date>2018-04-30T10:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using promises as popupTemplate content</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144927#M13501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've run into this problem as well after updating to 4.7. In&amp;nbsp;prior versions of 4.x,&amp;nbsp;native promises worked as expected for popup templates but at 4.7 they do not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is to NOT use native promises and instead use Dojo's version of promises: &lt;A href="https://dojotoolkit.org/reference-guide/1.10/dojo/Deferred.html"&gt;dojo/Deferred&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is that there is no .isFulfilled() method on native promises, however that method is is present on dojo/Deferred. I meant to file a bug report with Esri for this the other day when I found it but have not yet done so.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 01:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144927#M13501</guid>
      <dc:creator>ToddAtkins</dc:creator>
      <dc:date>2018-05-01T01:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using promises as popupTemplate content</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144928#M13502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool, thanks for your answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2018 05:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-promises-as-popuptemplate-content/m-p/144928#M13502</guid>
      <dc:creator>KevinHaeni</dc:creator>
      <dc:date>2018-05-01T05:58:33Z</dc:date>
    </item>
  </channel>
</rss>

