From 4974f3b7c0159c76ab5fbb44c06a0f2be5f5d136 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 11 May 2017 18:00:54 +0530 Subject: [PATCH] Utility function to request full screen --- src/pyj/utils.pyj | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pyj/utils.pyj b/src/pyj/utils.pyj index ad6812bc54..bb1decb589 100644 --- a/src/pyj/utils.pyj +++ b/src/pyj/utils.pyj @@ -59,6 +59,16 @@ def encode_query_with_path(query, path): return path + encode_query(query, '#') +def request_full_screen(elem): + elem = elem or document.documentElement + if elem.requestFullScreen: + elem.requestFullScreen() + elif elem.webkitRequestFullScreen: + elem.webkitRequestFullScreen() + elif elem.mozRequestFullScreen: + elem.mozRequestFullScreen() + + _roman = list(zip( [1000,900,500,400,100,90,50,40,10,9,5,4,1], ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]