Baseline Widely available *
HTML <script>
ììë ë°ì´í°ì ì¤í ê°ë¥í ì½ë를 문ìì í¬í¨í ë ì¬ì©íë©° ë³´íµ JavaScript ì½ëì í¨ê» ìëë¤. WebGLì GLSL ì
°ì´ë íë¡ê·¸ëë° ì¸ì´, JSON ë± ë¤ë¥¸ ì¸ì´ìë ì¬ì©í ì ììµëë¤.
ì´ ììë ì ì í¹ì±ì í¬í¨í©ëë¤.
async
ì¼ë° ì¤í¬ë¦½í¸ì async
ìì±ì´ ì¡´ì¬íë©´ HTML 구문 ë¶ì ì¤ìë ì¤í¬ë¦½í¸ë¥¼ ê°ì ¸ì¤ë©°, ì¬ì© ê°ë¥í´ì§ë ì¦ì íê°ë¥¼ ìíí©ëë¤.
모ë ì¤í¬ë¦½í¸ì async
ìì±ì´ ì¡´ì¬íë©´ 모ë ì¤í¬ë¦½í¸ì 모ë ìì¡´ ì¤í¬ë¦½í¸ë¥¼ ì§ì° íìì ì¤ííë¯ë¡ í¨ê» ë³ë ¬ë¡ ë¶ë¬ì¤ë©°, ì´ì ëìì 구문 ë¶ìì ìííê³ ì¬ì© ê°ë¥í´ì§ë ì¦ì íê°í©ëë¤.
기존 ë°©ìì ë¸ë¼ì°ì ê° HTML ë¶ìì ê³ìí기 ì ì ì¤í¬ë¦½í¸ë¥¼ ë¶ë¬ì¤ê³ íê°íì´ì¼ íë¯ë¡, async
ìì±ì ì¬ì©íë©´ ë¶ì기를 ë©ì¶ë JavaScript를 ì ê±°í ì ììµëë¤. defer
ë ë¹ì·í í¨ë ¥ì ë
ëë¤.
async
ë ë¶ë¦¬ì¸ ìì±ì
ëë¤. ìì±ì´ ì¡´ì¬íë©´ ì°¸ì ëíë´ê³ , ìì±ì´ ì¡´ì¬íì§ ìì¼ë©´ ê±°ì§ì ëíë
ëë¤.
ë¸ë¼ì°ì í¸íì±ì ì°¸ê³ íì¸ì.
crossorigin
ì¼ë° script
ììë íì¤ CORS를 íµê³¼íì§ ëª»íì ë window.onerror
ì ìµìíì ì ë³´ë§ ëê¹ëë¤. crossorigin
ìì±ì ì ì 미ëì´ì ëí´ ë³ëì ëë©ì¸ì ì¬ì©íë ì¬ì´í¸ì ì¤ë¥ 기ë¡ì íì©í기 ìí´ ì¬ì©í ì ììµëë¤. ì í¨í ì¸ìì ëí ë³´ë¤ ìì¸í ì¤ëª
ì CORS ì¤ì ìì± ë¬¸ì를 ì°¸ê³ íì¸ì.
defer
ë¸ë¼ì°ì ê° ì¤í¬ë¦½í¸ë¥¼ 문ì ë¶ì ì´íì, ê·¸ë¬ë DOMContentLoaded
ë°ì ì´ì ì ì¤íí´ì¼ í¨ì ëíë´ë ë¶ë¦¬ì¸ ìì±ì
ëë¤.
defer
ìì±ì ê°ì§ ì¤í¬ë¦½í¸ë ìì ì íê°ê° ëë기 ì ê¹ì§ DOMContentLoaded
ì´ë²¤í¸ì ë°ìì ë§ìµëë¤.
ê²½ê³ :
src
ìì±ì´ ì¡´ì¬íì§ ìì ë(ì¸ë¼ì¸ ì¤í¬ë¦½í¸ì¸ ê²½ì° ë±)ìë ìë¬´ë° í¨ê³¼ë ìì¼ë¯ë¡ ì¬ì©í´ìë ìë©ëë¤.ëí 모ë ì¤í¬ë¦½í¸ë 기본ì ì¼ë¡ ì§ì° íê°íë¯ë¡,
defer
를 ì§ì í´ë ë³íê° ììµëë¤.
defer
ìì±ì ê°ì§ ì¤í¬ë¦½í¸ë 문ììì ìì를 ë°ë¼ ì¤íë©ëë¤.
기존 ë°©ìì ë¸ë¼ì°ì ê° HTML ë¶ìì ê³ìí기 ì ì ì¤í¬ë¦½í¸ë¥¼ ë¶ë¬ì¤ê³ íê°íì´ì¼ íë¯ë¡, defer
ìì±ì ì¬ì©íë©´ ë¶ì기를 ë©ì¶ë JavaScript를 ì ê±°í ì ììµëë¤. async
ë ë¹ì·í í¨ê³¼ë¥¼ ê°ì§ëë¤.
integrity
ì¬ì©ì ìì´ì í¸ê° ê°ì ¸ì¨ 리ìì¤ì ìê¸°ì¹ ëª»í ë³íì´ ì¡´ì¬íëì§ ê²ì¬í ë ì¬ì©í ì¸ë¼ì¸ ë©íë°ì´í°ì ëë¤. íì 리ìì¤ ë¬´ê²°ì± ë¬¸ì를 ì°¸ê³ íì¸ì.
nomodule
ES2015 모ëì ì§ìíë ë¸ë¼ì°ì ììë ì¤ííì§ ìì ì¤í¬ë¦½í¸ìì ëíë´ë ë¶ë¦¬ì¸ í¹ì±ì ëë¤. 모ëí JavaScript를 ì§ìíì§ ìë ì¤ëë ë¸ë¼ì°ì ê° ì¬ì©í ëì²´ ì¤í¬ë¦½í¸ì ì¬ì©í ì ììµëë¤.
nonce
script-src
Content-Security-Policy
ì íì´í¸ë¦¬ì¤í¸ì ì¤í¬ë¦½í¸ë¥¼ ë±ë¡í기 ìí, ìí¸íë ì¼íì© ì«ì(ë
¼ì¤, nonce)ì
ëë¤. ìë²ë ê³ ì í ì¼íì© ì«ìê°ì ì ì±
ì ì ì¡í ëë§ë¤ ìì±í´ì¼ í©ëë¤. ììì ì ì±
ì ì°íí ì ìëë¡, ì¶ì¸¡í ì ìë ììê°ì ì ê³µíë ê²ì´ ì¤ìí©ëë¤.
referrerpolicy
ì¤í¬ë¦½í¸ë¥¼ ê°ì ¸ì¬ ë, ëë ì¤í¬ë¦½í¸ê° ë¤ë¥¸ 리ìì¤ë¥¼ ê°ì ¸ì¬ ë ì ì¡í 리í¼ë¬ë¥¼ ëíë ëë¤.
no-referrer
: Referer
í¤ë를 ì ì¡íì§ ììµëë¤.no-referrer-when-downgrade
(기본ê°): TLS(HTTPS) ì§ìì íì§ ìë ì¶ì²ì ëí´ìë Referer
í¤ë를 ì ì¡íì§ ììµëë¤.origin
: Referer
í¤ëê° ìì² ì¶ì²(ì¤í´, í¸ì¤í¸, í¬í¸)를 í¬í¨í©ëë¤.origin-when-cross-origin
: ëì¼ ì¶ì² ìì²ìë 매ê°ë³ì를 ì ê±°í ì ì²´ URLì ì ì¡í©ëë¤. êµì°¨ ì¶ì² ìì²ìë ì¶ì²ë§ ì ì¡í©ëë¤.same-origin
: ëì¼ ì¶ì² ìì²ìë 매ê°ë³ì를 ì ê±°í ì ì²´ URLì ì ì¡í©ëë¤. êµì°¨ ì¶ì² ìì²ìë ì무 ë í¼ë¬ ì ë³´ë ë³´ë´ì§ ììµëë¤.strict-origin
: 목ì ì§ê° íì¬ ë¬¸ìì ëì¼íê±°ë ë ëì(HTTP(S)âHTTPS) ë³´ì ìì¤ì ê°ì§ ê²½ì° ì¶ì²ë¥¼ ì ì¡íê³ , ë ì·¨ì½(HTTPSâHTTP)í ê²½ì° ì ì¡íì§ ììµëë¤.strict-origin-when-cross-origin
: ëì¼ ì¶ì² ìì²ìë 매ê°ë³ì를 ì ê±°í ì ì²´ URLì ì ì¡í©ëë¤. 목ì ì§ê° íì¬ ë¬¸ìì ëì¼íê±°ë ë ëì ë³´ì ìì¤(HTTP(S)âHTTPS)ì ê°ì§ ê²½ì° ìì ì ì¶ì²ë¥¼ ì ì¡í©ëë¤. ê·¸ ì¸ì ê²½ì° ì무 ë í¼ë¬ ì ë³´ë ë³´ë´ì§ ììµëë¤.unsafe-url
: ëì¼ ì¶ì²ì êµì°¨ ì¶ì² ìì² ëª¨ëì ëí´ì ì ì²´ URLì ì ì¡í©ëë¤. TLSë¡ ë³´í¸íë 리ìì¤ìì ìì íì§ ìì ì¶ì²ì ê²½ë¡ê¹ì§ ë
¸ì¶íë¯ë¡ ìì íì§ ììµëë¤.ì°¸ê³ : ë¹ ë¬¸ìì´ ê°(""
)ì 기본ê°ì´ì referrerpolicy
í¹ì±ì ì§ìíì§ ìë ê²½ì° ì¬ì©íë ëì²´ê°ì
ëë¤. referrerpolicy
를 <script>
ììì ëª
ìíì§ ìì ê²½ì° ë ìì ë¨ê³ì ì ì±
, ì¦ ë¬¸ì ìì²´ë ëë©ì¸ì ì ì±
ì ë°ë¼ê°ëë¤. ìì ë¨ê³ ì ì±
ë ì¬ì©í ì ìì ë ë¹ ë¬¸ìì´ì no-referrer-when-downgrade
ë¡ ê°ì£¼í©ëë¤.
src
ì¸ë¶ ì¤í¬ë¦½í¸ë¥¼ ê°ë¦¬í¤ë URIì ëë¤. 문ì ë´ì ì¤í¬ë¦½í¸ë¥¼ ì§ì ì½ì íë ê² ëì ì¬ì©í ì ììµëë¤.
type
ì¤í¬ë¦½í¸ì ì íì ëíë ëë¤. ë¤ì ë¤ì¯ê°ì ë²ì£¼ ì¤ íëì ìí ì ììµëë¤.
type
ì í¬í¨íì§ ìê³ ìì í ì ì¸í ê²ì ì´êµ¬í©ëë¤. ë³´ë¤ ì¤ëë ë¸ë¼ì°ì ììë type
í¹ì±ì ê°ì¼ë¡ ì½ì
í¹ì (src
í¹ì±ì¼ë¡) ë¶ë¬ì¨ ì¤í¬ë¦½í¸ì ì¸ì´ë¥¼ íìí곤 íìµëë¤. JavaScript MIME ì íì ëª
ì¸ì ëì´ëì´ ììµëë¤.module
: ì¤í¬ë¦½í¸ë¥¼ JavaScript 모ëë¡ ê°ì£¼í©ëë¤. ì¤í¬ë¦½í¸ ì½í
ì¸ ì²ë¦¬ê° charset
ê³¼ defer
í¹ì±ì ìí¥ì ë°ì§ ììµëë¤. module
ì ë ìì¸í ì¬ì©ë²ì MDNì JavaScript 모ë ìë´ì를 ì°¸ê³ íì¸ì. 기존 ì¤í¬ë¦½í¸ì ë¬ë¦¬, 모ë ì¤í¬ë¦½í¸ë êµì°¨ ì¶ì² ê°ì ¸ì¤ê¸° ì CORS íë¡í ì½ì ì¬ì©í´ì¼ í©ëë¤.src
í¹ì±ì 무ìí©ëë¤.charset
ì§ìì´ ì¤ë¨ëììµëë¤
If present, its value must be an ASCII case-insensitive match for "utf-8
". It's unnecessary to specify the charset
attribute, because documents must use UTF-8, and the script
element inherits its character encoding from the document.
language
ì§ìì´ ì¤ë¨ëììµëë¤
Like the type
attribute, this attribute identifies the scripting language in use. Unlike the type
attribute, however, this attribute's possible values were never standardized. The type
attribute should be used instead.
ë¸ë¼ì°ì ê° êµ¬ë¬¸ ë¶ìì ì§ííë¤ ì¸ë¼ì¸ ì¤í¬ë¦½í¸ ëë async
, defer
, type="module"
í¹ì±ì´ ìë ì¤í¬ë¦½í¸ì ëë¬íë©´ ì¤í¬ë¦½í¸ë¥¼ ê°ì ¸ì¨ í ì¤íí기 ì ê¹ì§ ë¶ìì ì¤ë¨í©ëë¤.
ì¤í¬ë¦½í¸ë text/javascript
MIME ì íì ì¤ì í´ì¼ íë, ë¸ë¼ì°ì ë ê´ëí ê·ì¹ì ì ì©íì¬ ì´ë¯¸ì§ íí(image/*
), ë¹ëì¤ íí(video/*
), ì¤ëì¤ íí(audio/*
), text/csv
ííë¡ ì¤í¬ë¦½í¸ë¥¼ ë¶ë¬ì¤ë ¤ë ê²½ì°ë§ ì°¨ë¨íê³ ë머ì§ë íì©í©ëë¤. ì¤í¬ë¦½í¸ë¥¼ ì°¨ë¨í ê²½ì° load
ëì error
ì´ë²¤í¸ë¥¼ ììì ì ì¡í©ëë¤.
ë¤ì ìì ë <script>
ìì를 ì¬ì©í´ ì¸ë¶ ì¤í¬ë¦½í¸ë¥¼ ê°ì ¸ì¤ë ë²ì ë³´ì
ëë¤.
<script src="javascript.js"></script>
ê·¸ë¦¬ê³ ìë ì½ëë <script>
ìì ë´ë¶ì ì¸ë¼ì¸ ì¤í¬ë¦½í¸ë¥¼ ìì±íë ììì
ëë¤.
<script>
alert("Hello World!");
</script>
모ë ëì²´ ì¤í¬ë¦½í¸
type
í¹ì±ì´ module
ì ì§ìíë ë¸ë¼ì°ì ë nomodule
í¹ì±ì ê°ì§ 모ë <script>
를 무ìí©ëë¤. ê·¸ë¬ë¯ë¡ 모ë ì¤í¬ë¦½í¸ë¥¼ ì¬ì©íë©´ìë, 미ì§ì ë¸ë¼ì°ì 를 ìí ëì²´ ì¤í¬ë¦½í¸ë¥¼ nomodule
ë¡ íìí´ ì ê³µí ì ììµëë¤.
<script type="module" src="main.mjs"></script>
<script nomodule src="fallback.js"></script>
HTMLì ë°ì´í° ì½ì
í기
<script> ììì JavaScript ì¸ì ì í¨í MIME ì íì ì¬ì©íë©´ ìë²ì¬ì´ë ë ëë§ì íµí´ HTMLì ë°ì´í°ë¥¼ ì½ì í ì ììµëë¤.
<!-- Generated by the server -->
<script id="data" type="application/json">
{
"userId": 1234,
"userName": "John Doe",
"memberSince": "2000-01-01T00:00:00.000Z"
}
</script>
<!-- Static -->
<script>
const userInfo = JSON.parse(document.getElementById("data").text);
console.log("User information: %o", userInfo);
</script>
ëª
ì¸ ë¸ë¼ì°ì í¸íì± ê°ì´ 보기
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4