mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-11 11:50:54 +08:00
create bigscreen.d.ts
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/// <reference path="bigscreen.d.ts"/>
|
||||
|
||||
BigScreen.onchange = function(element: Element) {
|
||||
console.log("Full-screen element " + element + " changed.");
|
||||
}
|
||||
|
||||
BigScreen.onenter = function(element: Element) {
|
||||
console.log(BigScreen.element + " entered full-screen.");
|
||||
};
|
||||
|
||||
BigScreen.onexit = function() {
|
||||
console.log("Exited full-screen.");
|
||||
}
|
||||
|
||||
BigScreen.onerror = function(element: Element, reason: string) {
|
||||
console.log("Error sending " + element + " into full-screen: " + reason);
|
||||
}
|
||||
|
||||
console.log("full-screen-enabled? " + BigScreen.enabled);
|
||||
|
||||
BigScreen.request(document.documentElement);
|
||||
BigScreen.exit();
|
||||
BigScreen.toggle(document.documentElement);
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// Type definitions for BigScreen 2.0.4
|
||||
// Project: http://brad.is/coding/BigScreen/
|
||||
// Definitions by: Douglas Eichelberger <https://github.com/dduugg/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface BigScreenStatic {
|
||||
element: any;
|
||||
enabled: boolean;
|
||||
|
||||
exit(): void;
|
||||
onchange(element: Element): void;
|
||||
onenter(element: Element): void;
|
||||
onerror(element: Element, reason: string): void;
|
||||
onexit(): void;
|
||||
request(element: Element, onEnter?: (element: Element) => void, onExit?: () => void, onError?: (element: Element, reason: string) => void): void;
|
||||
toggle(element: Element, onEnter?: (element: Element) => void, onExit?: () => void, onError?: (element: Element, reason: string) => void): void;
|
||||
videoEnabled(video: HTMLVideoElement): boolean;
|
||||
}
|
||||
|
||||
declare var BigScreen: BigScreenStatic;
|
||||
Reference in New Issue
Block a user