-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
These are all over the place.
Types:
FileReader,EventSource,HTMLMediaElement,IDBRequest,XMLHttpRequest,WebSocketuse numbers (as static constants on the class)Document,MediaSource,RTCDataChanneluse strings
There is the existing guidance to use strings for enums, though number constants do have the nice property that comparisons are possible (e.g. this.readyState >= Foo.LOADING), and seem much more prevalent.
The states themselves are also all over the place:
Document: loading, interactive, completeMediaSource: closed, open, endedFileReader: empty, loading, doneEventSource: connecting, open, closedHTMLMediaElement: have nothing, have metadata, have current data, have future data, have enough dataHTMLTrackElement: none, loading, loaded, errorIDBRequest: pending, doneXMLHttpRequest: unsent, opened, headers received, loading, doneWebSocket: connecting, open, closing, closed
Of course these cannot be completely harmonized since the use cases are different, but I suspect there is some guidance that can be extracted to apply to future classes…
Metadata
Metadata
Assignees
Labels
No labels