Re: [web-nfc] Use addEventListener instead of watch

> Constructor is preferable if possible! I wonder why Web Bluetooth went with something else. Does creating it have to be async? Your last IDL block has it as promise-returning, and it's not clear to me why.

`BluetoothRemoteGATTCharacteristic` does not have a constructor because you have to interrogate the device in order to determine what characteristics are available. I generally support using constructors however it becomes awkward to use when you can construct an object representing a capability that doesn't exist. Then you need a mechanism to report that the object is invalid rather than refusing to create it in the first place.

-- 
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/w3c/web-nfc/issues/152#issuecomment-425548384 using your GitHub account

Received on Friday, 28 September 2018 19:55:59 UTC