From 6cb0ad1e1ae3759617ae012e41043ab8598adeaf Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Mon, 26 Sep 2022 12:46:01 +0200 Subject: [PATCH] Initialize a sensor object: Improve notation and terms being referenced. * Instead of checking if a dictionary member is present, use the more standard "exists" reference instead. * Use the standard foo["bar"] notation to access a dictionary member rather than foo.bar. --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 3406fe9..3d4fec4 100644 --- a/index.bs +++ b/index.bs @@ -1275,10 +1275,10 @@ to {{SensorErrorEventInit}}. 1. [=map/For each=] |key| → value of |options| 1. If the associated [=supported sensor options=] [=set/contains|does not contain=] |key| 1. [=Throw=] "{{NotSupportedError!!exception}}" {{DOMException}}. - 1. If |options|.{{frequency!!dict-member}} is [=present=], then - 1. Set |sensor_instance|.{{[[frequency]]}} to |options|.{{frequency!!dict-member}}. + 1. If |options|["{{frequency!!dict-member}}"] [=map/exists=], then + 1. Set |sensor_instance|.{{[[frequency]]}} to |options|["{{frequency!!dict-member}}"]. - Note: there is not guarantee that the requested |options|.{{frequency!!dict-member}} + Note: there is not guarantee that the requested |options|["{{frequency!!dict-member}}"] can be respected. The actual [=sampling frequency=] can be calculated using {{Sensor}} {{Sensor/timestamp!!attribute}} attributes.