Using fullscreen mode
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Want more browser support for this feature? Tell us why.
Fullscreen API ë í¹ì ììElement(ì í´ë¹ ììë¤ì)를 full-screen modeë¡ íìíê³ , ë ì´ì íìíì§ ìì¼ë©´ full-screen mode를 ì¢
ë£íë ë©ìë를 ì¶ê°í©ëë¤. ì´ë ê² íë©´ ì¬ì©ìì ì ì²´ íë©´ì ì¬ì©íì¬, ì¨ë¼ì¸ ê²ìê³¼ ê°ì ìíë ë´ì©ì íìí ì ììµëë¤. full-screen modeê° ì¢
ë£ë ëê¹ì§ íë©´ìì ë¸ë¼ì°ì ì 모ë ì ì ì¸í°íì´ì¤ ììì 기í ìì© íë¡ê·¸ë¨ì ì ê±°í ì ììµëë¤.
API ì¬ì© ë°©ë²ì ëí ìì¸í ë´ì©ì Guide to the Fullscreen API 문ì를 참조íì¸ì.
ì°¸ê³ : ì´ APIì ëí ì§ìì ì¬ë¬ ë¸ë¼ì°ì ìì ì´ë£¨ì´ì§ë©°, ë¤ìí ì ì²´ì ì ëì¬(prefix)ê° íìíê±°ë, ìµì ì¬ìì 구ííì§ ìë ê²½ì°ê° ë§ìµëë¤. ì´ API ì§ìì ëí ìì¸í ë´ì©ì ìëì ìë Browser compatibility ì¹ì ì 참조íì¸ì. Fullscreen API를 ì§ìíì§ ìë ì ì²´ì ê²½ì°, Fscreen ê³¼ ê°ì ë¼ì´ë¸ë¬ë¦¬ë¥¼ ì¬ì©í ì ììµëë¤.
Interfaces
Fullscreen API ìë ìì²´ ì¸í°íì´ì¤ê° ììµëë¤. ëì ì, full-screen 기ë¥ì ì ê³µíëë° íìí ë©ìë, ìì±(property), ì´ë²¤í¸ í¸ë¤ë¬ë¥¼ ì¶ê°í기 ìí´, ë¤ì ì¹ì ì ëì´ë ê²ê³¼ ê°ì ëª ê°ì§ ë¤ë¥¸ ì¸í°íì´ì¤ë¥¼ ì¶ê°í©ëë¤.
Methods
Fullscreen API ë Document, Element ì¸í°íì´ì¤ì ë©ìë를 ì¶ê°íì¬ full-screen mode를 ì¤ì íê±°ë í´ì í ì ììµëë¤.
Methods on the Document interface
Document.exitFullscreen()-
user agent ê° full-screen modeìì ì°½ 모ëë¡ ë¤ì ì íëëë¡ ìì²í©ëë¤. full-screen modeê° ìì í ì¢ ë£ëë©´
Promiseresolved 를 ë°íí©ëë¤.
Methods on the Element interface
Element.requestFullscreen()-
ì ì ìì´ì í¸ê° ì§ì í ìì(ê·¸ë¦¬ê³ ê·¸ ììë¤ê¹ì§)를 full-screen modeë¡ ì¤ì íê³ , ë¸ë¼ì°ì ì 모ë UI ììì ë¤ë¥¸ 모ë ì í리ì¼ì´ì ì íë©´ìì ì ê±°íëë¡ ì구í©ëë¤. full-screen modeê° íì±íëë©´
Promiseresolved를 ë°íí©ëë¤.
Properties
Document ì¸í°íì´ì¤ë full-screen modeê° ì§ìëê³ ì¬ì© ê°ë¥íì§, full-screen modeê° íì¬ íì±í ëì´ìëì§, ì´ë¤ ììê° ì¤í¬ë¦°ì ì¬ì©íê³ ìëì§ íì¸íëë° ì¬ì©í ì ìë ìì±(property)ì ì ê³µí©ëë¤.
DocumentOrShadowRoot.fullscreenElement-
fullscreenElementìì±ì DOM(í¹ì shadow DOM)ìì íì¬ full-screen modeë¡ íìëë ììElement를 ìë ¤ì¤ëë¤. ì´ê²ì´nullì¸ ê²½ì°, documentë full-screen modeê° ìëëë¤. Document.fullscreenEnabled-
fullscreenEnabledìì±(property)ì full-screen mode를 ì¬ì©í ì ìëì§ ì¬ë¶ë¥¼ ìë ¤ì¤ëë¤. ì´ì ê° ì´ë»ë (ì를ë¤ì´,"fullscreen"기ë¥ì´ íë½ëì§ ìê±°ë, full-screen modeê° ì§ìëì§ ìë ê²½ì°) full-screen mode를 ì¬ì©í ì ìì¼ë©´falseì ëë¤.
Event handlers
Fullscreen APIë full-screen mode를 ì¼ê³ ë ë í¹ì, full-screen modeì window modeê°ì ë³ê²½íë ê³¼ì ìì ì¤ë¥ê° ë°ìíë ê²ì ê°ì§íëë° ì¬ì©í ì ìë ë ê°ì§ ì´ë²¤í¸ë¥¼ ì ìí©ëë¤. ì´ë¬í ì´ë²¤í¸ì ëí ì´ë²¤í¸ í¸ë¤ë¬ë Document ìElement ì¸í°íì´ì¤ ìì ì¬ì©í ì ììµëë¤.
ì°¸ê³ :
ì´ë¬í ì´ë²¤í¸ í¸ë¤ë¬ ìì±(property)ì HTML 컨í
í¸ ìì±(attribute)ì¼ë¡ ì¬ì©í ì ììµëë¤. ì¦, HTML 컨í
í¸ìì fullscreenchange ë° fullscreenerror ì´ë²¤í¸ë¥¼ ì§ì í ì ììµëë¤. JavaScript ì½ëë¡ ì¶ê°í´ì¼ë§ í©ëë¤.
Event handlers on documents
Document.onfullscreenchange-
문ì(document)ê° full-screen modeë¡ ì íëê±°ë full-screen mode를 ì¢ ë£í ë
Documentë¡ ë³´ë´ì§ëfullscreenchangeì´ë²¤í¸ì ëí ì´ë²¤í¸ í¸ë¤ë¬ ì ëë¤. ì´ í¸ë¤ë¬ë ì¤ì§ ì ì²´ 문ìê° full-screen modeë¡ íìë ëë§ í¸ì¶ë©ëë¤. Document.onfullscreenerror-
ì ì²´ 문ìì ëí´ full-screen mode를 ì¬ì©íê±°ë, ì¬ì©íì§ ìëë¡ ì¤ì íë ëì ì¤ë¥ê° ë°ìíë©´,
Documentë¡ ë³´ë´ì§ëfullscreenerrorì´ë²¤í¸ì ì´ë²¤í¸ í¸ë¤ë¬ì ëë¤.
Event handlers on elements
Element.onfullscreenchange-
fullscreenchangeì´ë²¤í¸ê° ìì(element)ë¡ ì ì¡ëë©´, ììê° full-screen modeë¡ ë°°ì¹ëê±°ë ì ê±°ëììì ëíë´ë ì´ë²¤í¸ í¸ë¤ë¬ì ëë¤. Element.onfullscreenerror-
full-screen mode 를 ì¬ì©íê±°ë, ì¬ì©íì§ ìëë¡ ì¤ì íë ëì ì¤ë¥ê° ë°ìíë©´ ììë¡ ë³´ë´ì§ë
fullscreenerrorì´ë²¤í¸ì ì´ë²¤í¸ í¸ë¤ë¬ì ëë¤.
Obsolete properties
Document.fullscreen-
문ìì íì¬ full-screen modeë¡ íìëë ììê° ìë ê²½ì°
true, ê·¸ë ì§ ìì¼ë©´falseì Boolean ê°ì ëë¤.ì°¸ê³ : ëì ì
DocumentëShadowRootììfullscreenElementìì±(property)ì ì¬ì©íì¸ì. ê·¸ê²ì´nullì´ ìë ê²½ì°Elementê° full-screen modeë¡ íìë©ëë¤.
Events
Fullscreen APIë full-screen mode를 ì¼ê³ ë ë í¹ì, full-screen modeì window modeê°ì ë³ê²½íë ê³¼ì ìì ì¤ë¥ê° ë°ìíë ê²ì ê°ì§íëë° ì¬ì©í ì ìë ë ê°ì§ ì´ë²¤í¸ë¥¼ ì ìí©ëë¤.
fullscreenchange-
full-screen mode를 ì¬ì©íê±°ë, ì¬ì©íì§ ìëë¡ ì íí ë
Documentí¹ìElementë¡ ë³´ë ëë¤. fullscreenerror-
full-screen mode를 ì¬ì©íê±°ë, ì¬ì©íì§ ìëë¡ ì ííë ¤ê³ ìëíë ì¤ì ì¤ë¥ê° ë°ìíë©´
DocumentëëElementë¡ ë³´ë ëë¤.
Dictionaries
FullscreenOptions-
requestFullscreen()ì í¸ì¶í ë ì§ì í ì ìë ìµì ì¤ì ì ì ê³µí©ëë¤.
Controlling access
Feature Policyì ì¬ì©íì¬ full-screen modeì ì í¨ì±ì ì ì´í ì ììµëë¤. full-screen modeë "fullscreen"ì¼ë¡ ìë³ëê³ , 기본 íì© ëª©ë¡ ê°ì "self" ì
ëë¤. ì´ë ìµìì(top-level) 문ì 컨í
ì¤í¸ìì full-screen modeê° íì©ëë¤ë ê²ì ì미íë©°, ìµìì(top-most) 문ìì ê°ì ì¶ì²ìì ë¡ë ë ì¤ì²© ë 컨í
ì¤í¸ìë ì ì©ë©ëë¤.
ê¸°ë¥ ì ì± ì ì¬ì©íì¬ APIì ëí ì¡ì¸ì¤ë¥¼ ì ì´íë ìì¸í ë´ì©ì Using Feature Policyì 참조íì¸ì.
Usage notes
ì¬ì©ìë ESC (í¹ì F11) í¤ë¥¼ ë르기ë§íë©´ ì¬ì´í¸ ëë ì±ì´ íë¡ê·¸ëë° ë°©ìì¼ë¡ 기ë¤ë¦¬ë ëì ì, full-screen mode를 ì¢ ë£íëë¡ ì íí ì ììµëë¤. ì ì ì¸í°íì´ì¤ì ì´ëê°ì ì¬ì©ììê² ì´ ìµì ì ì¬ì©í ì ììì ì리ë, ì ì í ì ì ì¸í°íì´ì¤ ìì를 ì ê³µí´ì¼ í©ëë¤.
ì°¸ê³ : ë¤ë¥¸ íì´ì§ë¡ ì´ëíê±°ë, íì ë³ê²½íê±°ë, ìì© íë¡ê·¸ë¨ ì í기(ëë Alt-Tab)를 ì¬ì©íì¬, ë¤ë¥¸ ìì© íë¡ê·¸ë¨ì¼ë¡ ì ííë©´ ë§ì°¬ê°ì§ë¡ full-screen modeê° ì¢ ë£ë©ëë¤.
Example
ì´ ìì ììë ë¹ëì¤ê° ì¹ íì´ì§ì íìë©ëë¤. Return ëë Enter í¤ë¥¼ ë르면, ì¬ì©ìê° ë¹ëì¤ì 창과 full-screen íì를 ì íí ì ììµëë¤.
Watching for the Enter key
íì´ì§ê° ë¡ëëë©´, ì´ ì½ëê° ì¤íëì´ Enter í¤ ë¥¼ 주ìíë ì´ë²¤í¸ 리ì¤ë를 ì¤ì í©ëë¤.
document.addEventListener(
"keypress",
function (e) {
if (e.keyCode === 13) {
toggleFullScreen();
}
},
false,
);
Toggling full-screen mode
ì´ ì½ëë ì¬ì©ìê° Enter í¤ë¥¼ ë를 ë, ìì ì´ë²¤í¸ í¸ë¤ë¬ì ìí´ í¸ì¶ë©ëë¤.
function toggleFullScreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
}
}
}
먼ì documentì fullscreenElement ìì±(attribute)ê°ì ì´í´ë³´ê² ìµëë¤. ì¤ì ë°°í¬ ììë ì´ ìì ì ì ëì´ê° ë¶ì ë²ì (ì를ë¤ì´, mozFullscreenElement, msFullscreenElement, webkitFullscreenElement)ì íì¸í´ì¼ í©ëë¤. ê°ì´ nullì¸ ê²½ì°, 문ìë íì¬ window modeì ìì¼ë¯ë¡, full-screen modeë¡ ì íí´ì¼ í©ëë¤. ê·¸ë ì§ ìì¼ë©´, ì´ ììë ì§ê¸ full-screen mode ìíì
ëë¤. full-screen modeë¡ ì ííë ìì
ì, <video>ìììì Element.requestFullscreen()ì í¸ì¶íì¬ ìíí©ëë¤.
full-screen modeê° ì´ë¯¸ íì±í ë ê²½ì°(fullscreenElement ê° nullì´ ìë ê²½ì°), documentìì exitFullscreen()ì í¸ì¶íì¬ full-screen mode를 ì¢
ë£í©ëë¤.