<?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 [HELP]Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at... in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/2301326#M4250</link>
    <description>&lt;P&gt;I want to integration ACE&amp;nbsp;Editor(&amp;nbsp;&lt;A href="https://ace.c9.io/" target="_blank"&gt;https://ace.c9.io/&lt;/A&gt;&amp;nbsp;)&amp;nbsp; &amp;nbsp;in PowerBI,but got error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="error info" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/660645iA103ED1D69FCDE59/image-size/large?v=v2&amp;amp;px=999" role="button" title="fig01.png" alt="error info" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;error info&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;got warning in HTML:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="right status" style="width: 552px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/660648i4445F63F0B78E0FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="fig03.png" alt="right status" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;right status&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;no warning in powerbi:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="wrong status" style="width: 516px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/660649i3FD83D749C482E67/image-size/large?v=v2&amp;amp;px=999" role="button" title="fig04.png" alt="wrong status" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;wrong status&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 14:50:44 GMT</pubDate>
    <dc:creator>luojiandan_bi</dc:creator>
    <dc:date>2022-01-25T14:50:44Z</dc:date>
    <item>
      <title>[HELP]Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at...</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/2301326#M4250</link>
      <description>&lt;P&gt;I want to integration ACE&amp;nbsp;Editor(&amp;nbsp;&lt;A href="https://ace.c9.io/" target="_blank"&gt;https://ace.c9.io/&lt;/A&gt;&amp;nbsp;)&amp;nbsp; &amp;nbsp;in PowerBI,but got error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="error info" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/660645iA103ED1D69FCDE59/image-size/large?v=v2&amp;amp;px=999" role="button" title="fig01.png" alt="error info" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;error info&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;got warning in HTML:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="right status" style="width: 552px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/660648i4445F63F0B78E0FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="fig03.png" alt="right status" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;right status&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;no warning in powerbi:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="wrong status" style="width: 516px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/660649i3FD83D749C482E67/image-size/large?v=v2&amp;amp;px=999" role="button" title="fig04.png" alt="wrong status" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;wrong status&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 14:50:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/2301326#M4250</guid>
      <dc:creator>luojiandan_bi</dc:creator>
      <dc:date>2022-01-25T14:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: [HELP]Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at...</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/2337730#M4282</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/279316"&gt;@luojiandan_bi&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Because custom visuals are executed in sandboxed iframes, they have no origin and loading additional scripts via workers is not supported. I have spent a lot of time trying to integrate editors into visuals and the good ones all need to use workers - it's not possible to package the workers in a way that allows them to be loaded at execution time. Ace is not my first choice, and I hope to be able to use something else in time, but I have managed to integrate it and have it working for the JSON mode at least for now.&lt;/P&gt;
&lt;P&gt;With Ace you have two options that can realistically work:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Load the desired workers from a CDN without CORS restrictions at execution time (as again, the iframe sandbox means that a remote location has to allow requests from any domain).&lt;/LI&gt;
&lt;LI&gt;Use Ace with &lt;A href="https://github.com/ajaxorg/ace/wiki/Syntax-validation#:~:text=editor.session.setOption(%22useWorker%22%2C%20false)%3B" target="_self"&gt;the &lt;FONT face="courier new,courier"&gt;useWorker: false&lt;/FONT&gt; property&lt;/A&gt; and import an appropriate completer. For JavaScript, I think you might need to use the &lt;A href="https://www.npmjs.com/package/ace-builds" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;ace-builds&lt;/FONT&gt; package&lt;/A&gt;, with &lt;FONT face="courier new,courier"&gt;ace-builds/src-noconflict/mode-javascript.js&lt;/FONT&gt; (and any others that might need to be included; I haven't worked with the JS syntax but I knwo that if you want search box and theme functionality you'll need to do something similar for any of these references)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;As everyone's code is a little different it's hard to prescribe exactly what you need but hopefully this may give you some ideas. With Deneb I use&lt;A href="https://github.com/josdejong/jsoneditor" target="_self"&gt; jsoneditor&lt;/A&gt;, which includes Ace, but I'm really only taking advantage of its schema validation functionality, so I manually specify my own instance of Ace editor. As&amp;nbsp;such I &lt;A href="https://github.com/deneb-viz/deneb/blob/7e76f47ef92a41ffeb06641c10e69305774004be/src/core/services/JsonEditorServices.ts#L12" target="_self"&gt;handle my dependent imports here&lt;/A&gt;, which may also help you figure it out for your case.&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 18:52:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/2337730#M4282</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2022-02-14T18:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: [HELP]Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at...</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/4177079#M10818</link>
      <description>&lt;P&gt;Hi. Were you able to fix this issue? I recently switched my angular project to use vite + esbuild and facing the same issue with ace-builds. I could not find any solutions to it yet.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 07:48:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/HELP-Failed-to-execute-importScripts-on-WorkerGlobalScope-The/m-p/4177079#M10818</guid>
      <dc:creator>bslzz</dc:creator>
      <dc:date>2024-09-26T07:48:08Z</dc:date>
    </item>
  </channel>
</rss>

