phpcode112.blogspot.com Open in urlscan Pro
2607:f8b0:4006:809::2001  Public Scan

Submitted URL: http://phpcode112.blogspot.com/2012/01/html5-fullscreen-api-toggle-with.html
Effective URL: https://phpcode112.blogspot.com/2012/01/html5-fullscreen-api-toggle-with.html
Submission: On April 09 via api from US — Scanned from US

Form analysis 1 forms found in the DOM

https://phpcode112.blogspot.com/search

<form action="https://phpcode112.blogspot.com/search" target="_top">
  <div class="search-input">
    <input aria-label="Search this blog" autocomplete="off" name="q" placeholder="Search this blog" value="">
  </div>
  <input class="search-action flat-button" type="submit" value="Search" disabled="">
</form>

Text Content

Advertise Here!

Skip to main content


SEARCH THIS BLOG






HPH






HTML5 FULLSCREEN API TOGGLE WITH JAVASCRIPT -

 * Get link
 * Facebook
 * Twitter
 * Pinterest
 * Email
 * Other Apps

- January 15, 2012



i trying make button toggle (on/off) html5 fullscreen on website.

after reading plenty of documentation, appears there still inconsistencies among
how browsers treat properties it.

i went kind of "cross-browser" approach does work in firefox , safari/macos,
partially works in safari/windows , totally fails work in chrome , opera.

some castrated code snippets:

// class init initialize: function() {      this.elmbuttonfullscreen = $('fullscreen');     this.elmbuttonfullscreen.on('click', this.onclickfullscreen.bindaseventlistener(this)); },  // helper methods _launchfullscreen: function(element) {      if(element.requestfullscreen) { element.requestfullscreen(); }     else if(element.mozrequestfullscreen) { element.mozrequestfullscreen(); }     else if(element.webkitrequestfullscreen) { element.webkitrequestfullscreen(); } }, _cancelfullscreen: function() {      if(document.cancelfullscreen) { document.cancelfullscreen(); }     else if(document.mozcancelfullscreen) { document.mozcancelfullscreen(); }     else if(document.webkitcancelfullscreen) { document.webkitcancelfullscreen(); } }, _isfullscreen: function() {      fullscreen = document.fullscreenenabled || document.mozfullscreenenabled || document.webkitfullscreenenabled ? true : false;     if(this.debug) console.log('fullscreen enabled? ' + fullscreen);     return fullscreen; },  // callbacks onclickfullscreen: function(e) {      e.stop();     if(this._isfullscreen()) this._cancelfullscreen();     else this._launchfullscreen(document.documentelement); } 



changing 1st line of _isfullscreen function to

fullscreen = document.fullscreenenabled || document.mozfullscreenenabled || document.webkitisfullscreen ? true : false; 

does trick (at least firefox, chrome , safari on mac , windows)


 * Get link
 * Facebook
 * Twitter
 * Pinterest
 * Email
 * Other Apps


COMMENTS



POST A COMMENT


POPULAR POSTS FROM THIS BLOG


PERL - HOW TO GREP A BLOCK OF TEXT FROM A FILE -

- September 15, 2015
it can in xml or text format. how in general grep block of text in perl? <track
type="ws"> <range> <rangestart>0</rangestart> <rangeend>146.912</rangeend>
<locationindex>0</locationindex> <propertyindex>0</propertyindex> </range>
</track> <track type="ps" id="1"> <range> <rangestart>0</rangestart>
<rangeend>146.912</rangeend> <locationindex>1</locationindex>
<propertyindex>1</propertyindex> </range> </track> i want grep type="ps" , till
</range> . one solution open file, read line line , match block. open(fh,
"file.txt"); foreach $line (<fh>) { if ($line =~ m/type="cc"(.*?)<\/range>/) {
print $1; } } but there more optimal solution without reading file line l
Read more


DELPHI - HOW TO REMOVE ALL THE GRIPS ON A COOLBAR IF I HAVE SEVERAL COOLBANDS? -

- September 15, 2015
if set mycoolbar.fixedorder true,only grip on first band hidden. well,if use
delphi 7 create vcl forms application,then put coolbar on , create 3 coolbans
hold other controls,only grip , top coolbands can hidden setting
mycoolbar.fixedorder:=true. i've uploaded picture make things clear. you got
fixedorder property wrong. fixed property not allow bands rearranged if set true
. setting property of coolbar true keep user changing bands order @ runtime,
user can still move , resize bands. can give advice can do, actual solution
problem, well, have wait answer. my advice use 3 coolbars in row , setting
"fixedorder" property true , bandborderstyle bsnone . way grip hidden on of
them. about property, it's not bug of ide, actual preference of property.
Read more


JAVASCRIPT - ANIMATING ARRAY OF DIVS; ONLY THE FINAL ELEMENT IS MODIFIED -

- September 15, 2015
this baffling me @ moment. i'm experienced programmer looking throw bit of
surprise fiancee on countdown page our wedding. desired effect simulated
confetti falling behind main page. setup follows: i have array of divs in
javascript. each div absolutely positioned on page. have interval set updates
every 50 or milliseconds. on each tick, run loop on array of divs, ,
calculations , update positions. problem problem having, however, though can see
divs created, stored array, , modified (in case, each has slight randomized
rotation) during initialization phase, once tick update position starts, div
stored in whatever last slot of array gets position updated. tried hard-coding
each div index testing purposes, strictly last element update position. upon
printing current "left" , "top" style values each div before , after
calculations shows value has been changed, no visible change noticeable. here's
basic code: javascript var container;
Read more


Powered by Blogger
Theme images by Michael Elkan
Unknown Visit profile


ARCHIVE

 * September 2015848
 * August 2015925
 * July 2015886
 * June 2015852
 * May 2015892
 * April 2015936
 * March 2015889
 * February 2015889
 * January 2015929
 * September 2014863

 * August 2014887
 * July 2014882
 * June 2014933
 * May 2014888
 * April 2014879
 * March 2014930
 * February 2014919
 * January 2014911
 * September 2013891
 * August 2013862
 * July 2013893
 * June 2013894
 * May 2013907
 * April 2013847
 * March 2013844
 * February 2013894
 * January 2013907
 * September 2012897
 * August 2012906
 * July 2012839
 * June 2012863
 * May 2012924
 * April 2012896
 * March 2012893
 * February 2012852
 * January 2012851
 * September 2011865
 * August 2011885
 * July 2011841
 * June 2011854
 * May 2011914
 * April 2011856
 * March 2011887
 * February 2011891
 * January 2011870
 * September 2010968
 * August 2010870
 * July 2010877
 * June 2010941
 * May 2010932
 * April 2010849
 * March 2010900
 * February 2010880
 * January 2010906

Show more Show less


REPORT ABUSE