EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

MSFullscreenChange | MSFullscreenChange event

Fires when an element enters or exits full-screen mode.

Syntax

 

Event handler parameters

This method has no parameters.

Remarks

The event fires once the element is in full-screen mode, so you can get the current state. The following example checks msFullscreenElement to see if any elements are in full-screen mode. If the element is in full-screen mode, this returns the element, such as HTMLDivElement. If not, the msFullscreenElement property returns null.

Examples

The following example prints a message to the console whether or not an element is displayed in full-screen mode.


document.addEventListener("MSFullscreenChange", function () {
          if (document.msFullscreenElement != null) {
              console.info("Went full screen");
          } else {
              console.info("Exited full screen");              
          }
      });

See also

document
MSFullscreenError

 

 

표시:
© 2014 Microsoft