Skip to content

Commit

Permalink
Merge pull request #4105 from jeanp413/jp/fix-vs-160070
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar authored Sep 7, 2022
2 parents 1923473 + 3953db0 commit c57a52b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/browser/renderer/DevicePixelObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export function observeDevicePixelDimensions(element: HTMLElement, callback: (de
callback(width, height);
}
});
observer.observe(element, { box: ['device-pixel-content-box'] } as any);
try {
observer.observe(element, { box: ['device-pixel-content-box'] } as any);
} catch {
observer.disconnect();
observer = undefined;
}
return toDisposable(() => observer?.disconnect());
}

0 comments on commit c57a52b

Please sign in to comment.