The embed() function is called twice in rapid succession on loading the component, once in onChanges, and once in ngOnInit. The second of which tries to load data into the existing frame which in some situations hasn't been inserted into the dom yet.
To avoid this behavior, this PR simply returns in the first onChanges call.
The embed() function is called twice in rapid succession on loading the component, once in onChanges, and once in ngOnInit. The second of which tries to load data into the existing frame which in some situations hasn't been inserted into the dom yet.
To avoid this behavior, this PR simply returns in the first onChanges call.
Please see stackblitz: app and source
This is the error message thrown: