{"id":56540,"date":"2022-08-03T03:01:42","date_gmt":"2022-08-02T17:01:42","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=56540"},"modified":"2022-08-01T18:37:07","modified_gmt":"2022-08-01T08:37:07","slug":"fullscreen-api-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/fullscreen-api-primer-tutorial\/","title":{"rendered":"Fullscreen API Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/svg_clock.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Fullscreen API Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/svg_clock_fullscreen.jpg\" title=\"Fullscreen API Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Fullscreen API Primer Tutorial<\/p><\/div>\n<p>Today&#8217;s new API to explore, for us, relates to the <a target=_blank title='Fullscreen API' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Fullscreen_API'>Fullscreen API<\/a>.  The name says it all, except that we&#8217;ll reiterate &#8230;<\/p>\n<blockquote cite='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Fullscreen_API'><p>\nThe Fullscreen API adds methods to present a specific Element (and its descendants) in fullscreen mode, and to exit fullscreen mode once it is no longer needed. This makes it possible to present desired content\u2014such as an online game\u2014using the user&#8217;s entire screen, removing all browser user interface elements and other applications from the screen until fullscreen mode is shut off.\n<\/p><\/blockquote>\n<p> &#8230; and apply it as an optional &#8220;thing to do&#8221; with the SVG Network Clock last worked on with <a target=_blank title='SVG Network Clock Minimize Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/svg-network-clock-minimize-tutorial'>SVG Network Clock Minimize Tutorial<\/a>&#8216;s use of the <a target=_blank title='Page Visibility API' href='https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Page_Visibility_API'>Page Visibility API<\/a>, <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/svg_clock.html-----------GETME\">and changed<\/a> today regarding its <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/svg_clock.html-----------GETME\">HTML and Javascript supervisory svg_clock.htm<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/svg_clock.htm\">live run<\/a> link, where you can try out this easy to use API for yourself via Enter keyboard character usage.  Its &#8220;helperer outerer&#8221; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html-------------------GETME\">changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html-------------------GETME\">color_wheel.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/colour_wheel.html\">Colour Wheel timezone information web application<\/a> also got a Fullscreen API makeover, but its makeover was that little bit <font color=blue>more involved<\/font> on account of it having functional &#8220;onresize&#8221; event logic, as per HTML &#8230;<\/p>\n<p><code><br \/>\n&lt;body title=\"Key enter toggles fullscreen mode.\" align=\"center\" style=\"background-color: lightblue;\" onload=\" setTimeout(athnlater, 15000); setTimeout(athn, 5000); onl();\" onresize=\"if (oktor && document.getElementById('divnoresize').innerHTML == '' && document.URL.indexOf('&') != -1) { console.log('2');   <font color=blue>if (tgon.length == 0) {<\/font> location.href=document.URL.replace('?x=','?xx=').split('#')[0].split('&x=')[0] + '&x=' + Math.floor(Math.random() * 12895643); <font color=blue>}<\/font>  } else if (oktor && document.getElementById('divnoresize').innerHTML == '' && document.URL.indexOf('?') != -1 && document.URL.indexOf('=GMT') == -1) { console.log('3');   if (tgon.length == 0) {   location.href=document.URL.split('#')[0].split('&')[0] + '&x=' + Math.floor(Math.random() * 12895643); } } else if (oktor && document.getElementById('divnoresize').innerHTML == '') { console.log('4');   <font color=blue>if (tgon.length == 0) {<\/font>  location.href=document.URL.split('#')[0].split('?')[0] + '?x=' + Math.floor(Math.random() * 12895643); <font color=blue>}<\/font> }\"&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; supported by Javascript &#8230;<\/p>\n<p><code><br \/>\n <font color=blue>var tgon='';<\/font><br \/>\n<br \/>\nfunction toggleFullScreen() { \/\/ Thanks to https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Fullscreen_API<br \/>\n  if (!document.fullscreenElement) {<br \/>\n    <font color=blue>tgon='y';<\/font><br \/>\n    document.documentElement.requestFullscreen();<br \/>\n  } else if (document.exitFullscreen) {<br \/>\n    <font color=blue>tgon='n';<\/font><br \/>\n    document.exitFullscreen();<br \/>\n    <font color=blue>tgon='';<\/font><br \/>\n  }<br \/>\n}<br \/>\n<br \/>\ndocument.addEventListener(\"keydown\", function(e) {<br \/>\n  if (e.key === \"Enter\") {<br \/>\n    toggleFullScreen();<br \/>\n  }<br \/>\n}, false);<br \/>\n<\/code><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d56540' onclick='var dv=document.getElementById(\"d56540\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/screen\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56540' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s new API to explore, for us, relates to the Fullscreen API. The name says it all, except that we&#8217;ll reiterate &#8230; The Fullscreen API adds methods to present a specific Element (and its descendants) in fullscreen mode, and to &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/fullscreen-api-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[1933,4050,4047,4046,4048,576,652,673,4049,1578,997,2256,1226,3325,1319],"class_list":["post-56540","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-clock","tag-enter","tag-full","tag-fullscreen","tag-fullscreen-api","tag-html","tag-javascript","tag-keyboard","tag-network-clock","tag-onresize","tag-programming","tag-screen","tag-svg","tag-toggle","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56540"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=56540"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56540\/revisions"}],"predecessor-version":[{"id":56547,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56540\/revisions\/56547"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=56540"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=56540"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=56540"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}