Network Information API
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: ì´ ê¸°ë¥ì ì¤íì ì¸ ê¸°ë¥ì
ëë¤.
íë¡ëì
íê²½ìì ì¬ì©í기 ì ì ë¸ë¼ì°ì í¸íì± í를 주ì ê¹ê² íì¸íì¸ì.
ë¤í¸ìí¬ ì ë³´ APIë ì¬ì©ì 기기ì íì¬ ëìíì´ë ê³¼ê¸ì´ ëë ì°ê²°ì¸ì§ì ê°ì ìì¤í
ì ì°ê²° ì 보를 ìë ¤ì¤ëë¤. ì´ë¥¼ ì´ì©í´ì ì¬ì©ììê² ëì ì©ëì ì½í
ì¸ ë¥¼ ì ê³µí ì§ ë®ì ì©ëì ì½í
ì¸ ë¥¼ ì ê³µí ì§ ì¬ì©ìì ì°ê²° ìíì ë°ë¼ì ì ê³µí ì ììµëë¤. ì ì²´ APIë DOMì ì¶ê°ë ë¨ì¼í ê°ì²´ë¡ 구ì±ëì´ ììµëë¤: window.navigator.connection.
ì°ê²°ìí ë³ê²½ ê°ì§
ì´ ìì ë ì¬ì©ìì ì°ê²°ìí ë³í를 ê°ìí©ëë¤. ì¬ì©ìê° ë¹ì¼ ë§ìì ì¼ ë§ì¼ë¡ ì´ëí ë ì¬ì©ìê° ì¶ê°ì ì¸ ë¹ì©ì ì§ë¶íì§ ìê² í기 ìí´ì ì ì¡ëì ê°ììí¤ë ë±ê³¼ ê°ì íëì í ì ìê² ì±ì´ ê²½ê³ ë¥¼ íë ì¼ê³¼ ë¹ì·í©ëë¤.
var connection =
navigator.connection || navigator.mozConnection || navigator.webkitConnection;
function updateConnectionStatus() {
alert("Connection bandwidth: " + connection.bandwidth + " MB/s");
if (connection.metered) {
alert("The connection is metered!");
}
}
connection.addEventListener("change", updateConnectionStatus);
updateConnectionStatus();
ëª ì¸
| Specification |
|---|
| Network Information API > |