Access document via self.document

PiperOrigin-RevId: 578635298
This commit is contained in:
Sebastian Schmidt 2023-11-01 14:06:03 -07:00 committed by Copybara-Service
parent 9474394768
commit e81fc5d0aa

View File

@ -32,6 +32,5 @@ export function isIOS() {
// tslint:disable-next-line:deprecation
].includes(navigator.platform)
// iPad on iOS 13 detection
|| (navigator.userAgent.includes('Mac') &&
(typeof document !== undefined && 'ontouchend' in document));
|| (navigator.userAgent.includes('Mac') && 'ontouchend' in self.document);
}