This repository was archived by the owner on Aug 5, 2022. It is now read-only.
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
[sensor] Not readonly properties for state and readvalue #595
Closed
Description
State and readvalue of sensor should be readonly properties, but actually it can be modified.
W3C Sensor APIs:
readonly attribute SensorState state;
readonly attribute SensorReading? reading;
code for test state:
middleState = sensor.state;
sensor.state = middleState + "love";
assert(sensor.state === middleState, "sensor: state is readonly property");
code for test reading(AmbientLight):
middleNum = event.reading.illuminance;
event.reading.illuminance = middleNum + 1;
assert(event.reading.illuminance === middleNum, "sensor: reading is readonly property");