Forum Discussion
whileoneloop
9 years agoNew Member
Exception raised when using Telerik Kendo UI components in PowerBI's visualsandbox
Attempting to use an external UI library (Telerik Kendo UI) and receiving the following exception: -- Uncaught TypeError: Illegal invocation at <anonymous>:562:21817 at <anonymous>:562:2721...
- 9 years ago
You have to include these code into your code:
Object.defineProperties(window, { 'devicePixelRatio': { get: function () { return window.window.devicePixelRatio; } }, 'innerWidth': { get: function () { return window.window.innerWidth; } } }); var kendo = { cultures: {} }; window.kendo = kendo; window.window.kendo = kendo;Please take a look at this pull request.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
v-viig
9 years agoCommunity Champion
You have to include these code into your code:
Object.defineProperties(window, {
'devicePixelRatio': {
get: function () {
return window.window.devicePixelRatio;
}
},
'innerWidth': {
get: function () {
return window.window.innerWidth;
}
}
});
var kendo = { cultures: {} };
window.kendo = kendo;
window.window.kendo = kendo;Please take a look at this pull request.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
drewhaller
7 years agoFrequent Visitor
This no longer works when upgrading api from 1.7.0 to 2.3.0 or 2.5.0.
it seems the 2 properies are no longer need but later and issue is faced where code this.kendo.util throws TypeError: Cannot read property 'util' of undefined. In running their samples this refers to window object so not clear why this is failing due to pbiviz api update.
Anyone know how to resolve this ?