-
Notifications
You must be signed in to change notification settings - Fork 161
Fix #374: Deprecate DOMError in favor of DOMException. #375
New issue
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
Conversation
* object, representing the generated offer. | ||
* | ||
* If the SDP generation process failed for any reason, the user agent must | ||
* reject the returned promise with an DOMError object of type TBD as its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method documentation came from WebRTC spec, but the latest spec for this method documentation changes a lot.
Because this comment mentioned DOMError
, so I guess I need update this comment too, so I replace this method documentation with the MDN one. I am glad to revert this large documentation change if needed.
* object, representing the generated answer. | ||
* | ||
* If the SDP generation process failed for any reason, the user agent must | ||
* reject the returned promise with a DOMError object of type TBD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@@ -570,8 +569,8 @@ object MediaDeviceInfo { | |||
trait NavigatorMediaStream extends js.Object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find this in MediaStream
API. I am not sure whether the origin author added this trait by accident. I guess we can remove this trait completely?
@@ -26,7 +27,7 @@ package object webrtc { | |||
"Navigator.getUserMedia() is deprecated, use Navigator.mediaDevices.getUserMedia() instead.", | |||
"2014-05-28") | |||
def getUserMedia(constraints: MediaStreamConstraints, | |||
success: js.Function1[MediaStream, Any], | |||
error: js.Function1[DOMError, Any]): Unit = js.native | |||
successCallback: js.Function1[MediaStream, Any], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this method argument names are incorrect[1], so I updated these two arugment names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I have a few comments.
* Add new error sets. * Reorder error sets in numeric order. So we can add new error sets easily in the future.
I have addressed your mentioned problems and rebased code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. All good, except one typo in the second commit message. It has:
Replace DOMError with DOMError.
But the second DOMError
should obviously be DOMException
.
After that it's good to merge.
* Replace DOMError with DOMException. * Update documentation for old DOMError reference. * Remove NavigatorMediaStream trait in MediaStream, because this facade use DOMError but it doesn't exist in MediaStream API actually. See: https://dom.spec.whatwg.org/#domerror https://bugs.chromium.org/p/chromium/issues/detail?id=460725 https://bugzilla.mozilla.org/show_bug.cgi?id=1120178
Thanks. I have fixed the typo! |
Fix #374