We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0122564 commit 42f5f13Copy full SHA for 42f5f13
src/types/events/index.ts
@@ -143,5 +143,5 @@ export interface VideomailEvents {
143
// document just became visible
144
VISIBLE: () => void;
145
// when window's inner width has changed
146
- WINDOW_RESIZE: () => void;
+ WINDOW_RESIZE: (source: string) => void;
147
}
src/wrappers/container.ts
@@ -237,7 +237,11 @@ class Container extends Despot {
237
this.options.logger.debug(`Container: initEvents (playerOnly = ${playerOnly})`);
238
239
window.addEventListener("resize", () => {
240
- this.emit("WINDOW_RESIZE");
+ if (!this.built) {
241
+ return;
242
+ }
243
+
244
+ this.emit("WINDOW_RESIZE", "container");
245
});
246
247
if (this.options.enableAutoUnload) {
0 commit comments