@@ -69,7 +69,7 @@ export class Service implements IService {
6969 /**
7070 * A list of components that this service can embed
7171 */
72- private static components : ( typeof Report | typeof Tile | typeof Dashboard ) [ ] = [
72+ private static components : ( typeof Report | typeof Tile | typeof Dashboard ) [ ] = [
7373 Tile ,
7474 Report ,
7575 Dashboard
@@ -170,7 +170,6 @@ export class Service implements IService {
170170 let powerBiElement = < IPowerBiElement > element ;
171171 const component = new Create ( this , powerBiElement , config ) ;
172172 powerBiElement . powerBiEmbed = component ;
173-
174173 this . addOrOverwriteEmbed ( component , element ) ;
175174
176175 return component ;
@@ -270,7 +269,7 @@ export class Service implements IService {
270269 const report = new Report ( this , element , config , element . powerBiEmbed . iframe ) ;
271270 report . load ( < embed . IInternalEmbedConfiguration > config ) ;
272271 element . powerBiEmbed = report ;
273-
272+
274273 this . addOrOverwriteEmbed ( component , element ) ;
275274
276275 return report ;
@@ -350,7 +349,13 @@ export class Service implements IService {
350349 /** Removes the iframe from the element. */
351350 const iframe = element . querySelector ( 'iframe' ) ;
352351 if ( iframe ) {
353- iframe . remove ( ) ;
352+ if ( iframe . remove !== undefined ) {
353+ iframe . remove ( ) ;
354+ }
355+ else {
356+ /** Workaround for IE: unhandled rejection TypeError: object doesn't support propert or method 'remove' */
357+ iframe . parentElement . removeChild ( iframe ) ;
358+ }
354359 }
355360 }
356361
0 commit comments