[Webkit-unassigned] [Bug 200427] New: WebRTC: got incorrect `this` in negotiationneeded event
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Aug 4 01:39:19 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=200427
Bug ID: 200427
Summary: WebRTC: got incorrect `this` in negotiationneeded
event
Product: WebKit
Version: Safari 12
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebRTC
Assignee: webkit-unassigned at lists.webkit.org
Reporter: zjcqoo at qq.com
CC: youennf at gmail.com
```html
<!--
UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15
-->
<script>
const pc = new RTCPeerConnection(null)
pc.onnegotiationneeded = async function(e) {
console.log(pc === this) // return false! should be true
// TypeError:
// Can only call RTCPeerConnection.createOffer on instances of RTCPeerConnection
const offer = await this.createOffer()
console.log('offer:', offer)
}
pc.createDataChannel('x')
</script>
```
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190804/0a0eed69/attachment-0001.html>
More information about the webkit-unassigned
mailing list