CARVIEW |
Select Language
HTTP/2 200
date: Mon, 06 Oct 2025 10:20:02 GMT
content-type: text/html
content-encoding: gzip
last-modified: Mon, 17 Jun 2024 18:17:01 GMT
cache-control: max-age=2592000, public
expires: Wed, 05 Nov 2025 10:20:02 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98a46c80a8101f95
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: EXPIRED
set-cookie: __cf_bm=uZSrWc2JU9ccnv5EN8_UT7e0vn.4_8xhYQKDS7pkpBY-1759746002-1.0.1.1-8.vrLPeg_w3LzZkXl3um5wGjF0qLMFf0asGJ59DeXbKQ1PzXWTdhlVtHM2OxBPQnAHzGZgF1CeVtpgpH.GW84OLANREc9Xr4sEbwQREJk.g; path=/; expires=Mon, 06-Oct-25 10:50:02 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98a46c80a8101f95-BLR
alt-svc: h3=":443"; ma=86400
addEventListener with side effects from Dominique Hazael-Massieux on 2011-11-16 (public-device-apis@w3.org from November 2011)
addEventListener with side effects
- From: Dominique Hazael-Massieux <dom@w3.org>
- Date: Wed, 16 Nov 2011 11:32:08 +0100
- To: public-device-apis <public-device-apis@w3.org>, Robin Berjon <robin@robineko.com>
- Message-ID: <1321439528.26049.93.camel@altostratustier>
Hi, When we discussed the model for the battery API a few weeks ago, we stumbled upon an open issue (ISSUE-113 [1]) around having events triggered upon registration (i.e. when they are added via addEventListener), which was an issue the Geolocation WG was working on for their DeviceOrientation spec. They discussed that issue at their F2F during TPAC: https://www.w3.org/2011/11/01-geolocation-minutes.html#item03 During that discussion, it was argued that a callback pattern would probably have been a better approach for DeviceOrientation due to the need of powering hardware and getting first event upon registration — Robin, maybe something to document in the API cookbook after further discussion with Geo/Hixie/Anne ? "Hixie: Conceptually with events, you have this thing firing events all the time and you just hook into it. Conceptually, the events are always there, not plugging in and turning things on. " To work around this potential mis-design, specific wording was added to the DeviceOrientation spec: "Implementations may fire the event if they have reason to believe the page does not have sufficiently fresh data" Dom 1. https://www.w3.org/2009/dap/track/issues/113
Received on Wednesday, 16 November 2011 10:32:33 UTC