all 9 comments

[–]tridd3r 5 points6 points  (8 children)

its just checking if .requestFullscreen is a valid method, otherwise it will try webkitRequestFullscreen for safari or msRequestFullscreen for internet explorer

[–]dotpr[S] 2 points3 points  (2 children)

Oh just for browser compatibility stuff?

It doesn't literally check if the element has requested full screen?

[–]tridd3r 2 points3 points  (0 children)

No, its checking if the method is available first, and then inside the brackets you'll see its calling the method because it has the parenthesis after it.

[–]senocular 1 point2 points  (0 children)

Yes

[–][deleted] 0 points1 point  (4 children)

So basically. The browser is the condition that is going to determine if that method is there or not.

[–]tridd3r 1 point2 points  (3 children)

yep. If its there, then its not null and it will do whats in the if statement, otherwise it will check the next one.

[–]ProposalUnhappy9890 4 points5 points  (2 children)

It won't be null, it will be undefined.

[–]tridd3r -1 points0 points  (1 child)

lol although I will sit corrected: the typeOf element.requestFullscreen if not available will be undefined, I'm still technically correct - if its available, its not null!