Skip to content

Commit

Permalink
Add the 'fullscreenchange' event (#370)
Browse files Browse the repository at this point in the history
* Add the 'fullscreenchange' event

* API Fixe
  • Loading branch information
ryanisaacg authored and koute committed Oct 7, 2019
1 parent d18e46a commit 6d425bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ pub mod web {
UnloadEvent,
BeforeUnloadEvent,

FullscreenChangeEvent,

EventPhase
};

Expand Down
11 changes: 11 additions & 0 deletions src/webapi/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ pub struct UnloadEvent( Reference );

impl IEvent for UnloadEvent {}

/// The 'FullscreenChange' event fires when an element enters or exits fullscreen
///
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreenchange_event)
// https://fullscreen.spec.whatwg.org/#handler-document-onfullscreenchange
#[derive(Clone, Debug, PartialEq, Eq, ReferenceType)]
#[reference(instance_of = "Event")]
#[reference(event = "fullscreenchange")]
pub struct FullscreenChangeEvent( Reference );

impl IEvent for FullscreenChangeEvent {}

/// The `IUiEvent` interface represents simple user interface events.
///
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent)
Expand Down

0 comments on commit 6d425bc

Please sign in to comment.