Cleanups and tidy fixes

This commit is contained in:
Fernando Jiménez Moreno 2020-06-02 10:52:34 +02:00
parent ace0d7795e
commit 960b010d30
8 changed files with 23 additions and 24 deletions

View file

@ -48,6 +48,7 @@ impl RTCDataChannelEvent {
event
}
#[allow(non_snake_case)]
pub fn Constructor(
window: &Window,
type_: DOMString,
@ -64,10 +65,12 @@ impl RTCDataChannelEvent {
}
impl RTCDataChannelEventMethods for RTCDataChannelEvent {
// https://www.w3.org/TR/webrtc/#dom-datachannelevent-channel
fn Channel(&self) -> DomRoot<RTCDataChannel> {
DomRoot::from_ref(&*self.channel)
}
// https://dom.spec.whatwg.org/#dom-event-istrusted
fn IsTrusted(&self) -> bool {
self.event.IsTrusted()
}