Skip to content

Commit 6d425bc

Browse files
ryanisaacgkoute
authored andcommitted
Add the 'fullscreenchange' event (#370)
* Add the 'fullscreenchange' event * API Fixe
1 parent d18e46a commit 6d425bc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ pub mod web {
336336
UnloadEvent,
337337
BeforeUnloadEvent,
338338

339+
FullscreenChangeEvent,
340+
339341
EventPhase
340342
};
341343

src/webapi/event.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,17 @@ pub struct UnloadEvent( Reference );
236236

237237
impl IEvent for UnloadEvent {}
238238

239+
/// The 'FullscreenChange' event fires when an element enters or exits fullscreen
240+
///
241+
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenchange_event)
242+
// https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenchange
243+
#[derive(Clone, Debug, PartialEq, Eq, ReferenceType)]
244+
#[reference(instance_of = "Event")]
245+
#[reference(event = "fullscreenchange")]
246+
pub struct FullscreenChangeEvent( Reference );
247+
248+
impl IEvent for FullscreenChangeEvent {}
249+
239250
/// The `IUiEvent` interface represents simple user interface events.
240251
///
241252
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent)

0 commit comments

Comments
 (0)