Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
blumi78
Helper I
Helper I

Custom Visual: Using Javascript Promises in Internet Explorer 11

IE 11 still doesn't support ES2015 features like Promises.

 

My default approach here is to use a Polyfill lib, include it in "externalJS" section of pbiviz.json and add "es2015" as lib to tsconfig.json.

 

As a result, the custom visual compiles, but the first use of a Promise results in an error:

new Promise((resolve, reject) => {
    resolve();
});

ERROR TypeError: Erlaubnis verweigert.
Die Eigenschaft "getOwnPropertyNames" eines undefinierten oder Nullverweises kann nicht abgerufen werden.
In english it's probably

ERROR TypeError: Permission denied.
The "getOwnPropertyNames" property of an undefined or null reference can not be retrieved.

 

However, when I write instead

new window["Promise"]((resolve, reject) => {
    resolve();
});

.. it works as expected.

 

What's happening here?

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.