Skip to content

Commit 949fffb

Browse files
committed
fix: only warn only when forceImplementation isn't set to polling
1 parent f6a80b9 commit 949fffb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/webshell/src/features/HandleHTMLDimensionsFeature.webjs

+7-6
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,12 @@ function HandleHTMLDimensionsFeature(context) {
7575
window.addEventListener('resize', pollingPostDimensions);
7676
setInterval(pollingPostDimensions, pollingInterval);
7777
pollingPostDimensions();
78-
context.warn(
79-
"This browser doesn't support either MutationObserver or ResizeObserver." +
80-
'The dimensions will still be read every' +
81-
pollingInterval +
82-
'ms and committed when a change is observed.'
83-
);
78+
forceImplementation !== 'polling' &&
79+
context.warn(
80+
"This browser doesn't support either MutationObserver or ResizeObserver." +
81+
'The dimensions will still be read every ' +
82+
pollingInterval +
83+
'ms and committed when a change is observed.'
84+
);
8485
}
8586
}

0 commit comments

Comments
 (0)