W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > October 2017

[webrtc-pc] Why is setDirection a method?

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Tue, 24 Oct 2017 16:32:42 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-268101570-1508862761-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/webrtc-pc:

== Why is setDirection a method? ==
Sure, [transceiver.setDirection(direction)](http://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver) can throw, but so can attributes!

`transceiver.direction = direction` seems superior. I checked with our DOM folks, and they agree.

The algorithm seems like a shoo-in, setting the (today readonly) `direction` attribute, so no change there.

Also, since setting `direction` merely sets the negotiationneeded flag, there's zero chance of us ever wanting this method to return a promise or anything like that.

We're going over final review of our implementation slated for Firefox 59, and thought this made sense.

@taylor-b @adam-be WDYT?

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1643 using your GitHub account
Received on Tuesday, 24 October 2017 16:32:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:47 UTC