W3C home > Mailing lists > Public > public-device-apis-log@w3.org > December 2018

Re: [wake-lock] Subtleties of using Document are not specced (#141)

From: Domenic Denicola via GitHub <sysbot+gh@w3.org>
Date: Thu, 20 Dec 2018 19:44:01 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-449114204-1545335040-sysbot+gh@w3.org>
I see that there's an attempt to handle documents without a browsing context by checking document.defaultView. But that's not robust; if I do `Object.defineProperty(xhr.responseDoc, "defaultView", { value: "non-null" })` the spec will currently 'crash'. You should explicitly check if the document has a browsing context. (There are similar problems with the `window.navigator` line later on.)

-- 
GitHub Notification of comment by domenic
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/141#issuecomment-449114204 using your GitHub account
Received on Thursday, 20 December 2018 19:44:02 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:56 UTC