Is there a way to manually trigger the window resize event (the one that occurs when you resize your browser window) using Dojo
? I need this functionality to dynamically resize my C3
Charts.
I came across the on
module in Dojo, which allows for listening and triggering custom events using the emit
function. Here is what I attempted:
on.emit(win, 'resize', {bubbles: true, cancelable: true});
In this code snippet, win
refers to the dojo/_base/window
module that I used as the source of the triggered event. Additionally, I also explored another approach:
on.emit(win.body(), 'resize', {bubbles: true,cancelable: true});
However, despite these attempts, I have been unsuccessful in getting the event to reach my charts. They are not responding to the event being triggered.