We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In step 8 of https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-createdatachannel:
If both the maxPacketLifeTime and maxRetransmits attributes are set (not null), throw a SyntaxError.
This error must not be a SyntaxError, which defined as:
19.5.5.4SyntaxError Indicates that a parsing error has occurred.
The correct error to use is TypeError. Given the same case, applied to descriptor properties:
Object.defineProperty({}, "foo", { get() { return 1; }, writable: false });
Will have such results as:
TypeError: property descriptors must not specify a value or be writable when a getter or setter has been specified
Uncaught TypeError: Invalid property descriptor. Cannot both specify accessors and a value or writable attribute, #<Object>
TypeError: Invalid property. 'writable' present on property with getter or setter.
I recommend throwing a TypeError with message "Invalid options, maxPacketLifeTime and maxRetransmits cannot both be null" (or something similar)
The text was updated successfully, but these errors were encountered:
I think this makes sense. Created PR (#1356).
Sorry, something went wrong.
👍
Successfully merging a pull request may close this issue.
In step 8 of https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-createdatachannel:
This error must not be a SyntaxError, which defined as:
The correct error to use is TypeError. Given the same case, applied to descriptor properties:
Will have such results as:
I recommend throwing a TypeError with message "Invalid options, maxPacketLifeTime and maxRetransmits cannot both be null" (or something similar)
The text was updated successfully, but these errors were encountered: