diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
commit | a065e04d529da1d847b5062a12c46d916408bf32 (patch) | |
tree | fe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/id/web | |
parent | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff) | |
download | translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.gz translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.bz2 translated-content-a065e04d529da1d847b5062a12c46d916408bf32.zip |
update based on https://github.com/mdn/yari/issues/2028
Diffstat (limited to 'files/id/web')
-rw-r--r-- | files/id/web/api/mobile_connection_api/index.html | 149 | ||||
-rw-r--r-- | files/id/web/events/cached/index.html | 74 | ||||
-rw-r--r-- | files/id/web/javascript/new_in_javascript/index.html | 74 |
3 files changed, 0 insertions, 297 deletions
diff --git a/files/id/web/api/mobile_connection_api/index.html b/files/id/web/api/mobile_connection_api/index.html deleted file mode 100644 index 7b5462e2ef..0000000000 --- a/files/id/web/api/mobile_connection_api/index.html +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: Mobile Connection -slug: Web/API/Mobile_Connection_API -translation_of: Archive/B2G_OS/API/Mobile_Connection_API ---- -<p>{{ draft }}</p> -<p>{{ non-standard_header() }}</p> -<p>{{ B2GOnlyHeader2('certified') }}</p> -<h2 id="Summary">Summary</h2> -<p>This API has 2 purposes:</p> -<ul> - <li>Giving access to detailed information about the current states of the mobile connection of the device</li> - <li>Giving access to the specific capacities embedded within the <abbr title="Integrated Circuit Card">ICC</abbr> (the <abbr title="Subscriber Identity Module">SIM</abbr>/<abbr title="Removable User Identity Module">RUIM</abbr> card)</li> -</ul> -<p>As this API can access functionalities that can have an impact on the mobile plan subscribed by the user (some of the functionalities can cost money to use or can damage the <abbr title="Integrated Circuit Card">ICC</abbr>), it is restricted to certified applications only.</p> -<p>The main entry point for this API is the {{domxref("window.navigator.mozMobileConnection","navigator.mozMobileConnection")}} property which is an instance of the {{domxref("MozMobileConnection")}} interface.</p> -<h2 id="State_of_mobile_connection">State of mobile connection</h2> -<p>The state of the mobile connection is divided in two: on the one hand the <code>voice</code> connection, on the other hand the <code>data</code> connection. The data related to each type of connection are accessible through the {{domxref("MozMobileConnection.voice")}} and {{domxref("MozMobileConnection.data")}} properties which both return a {{domxref("MozMobileConnectionInfo")}} object.</p> -<p>Those objects give access to all information related to the quality of the network (<a href="/en-US/docs/DOM/MozMobileConnectionInfo.signalStrength" title="/en-US/docs/DOM/MozMobileConnectionInfo.signalStrength">signal strength</a>, <a href="/en-US/docs/DOM/MozMobileConnectionInfo.relSignalStrength" title="/en-US/docs/DOM/MozMobileConnectionInfo.relSignalStrength">quality of the signal</a>, position of the <a href="/en-US/docs/DOM/MozMobileConnectionInfo.cell" title="/en-US/docs/DOM/MozMobileConnectionInfo.cell">network's cells</a>, <a href="/en-US/docs/DOM/MozMobileConnectionInfo.emergencyCallsOnly" title="/en-US/docs/DOM/MozMobileConnectionInfo.emergencyCallsOnly">restricted usage</a>, <a href="/en-US/docs/DOM/MozMobileConnectionInfo.roaming" title="/en-US/docs/DOM/MozMobileConnectionInfo.roaming">roaming</a>, etc.), and related to <a href="/en-US/docs/DOM/MozMobileConnectionInfo.network" title="/en-US/docs/DOM/MozMobileConnectionInfo.network">the carrier operating the network</a>.</p> -<pre class="brush: js">var cnx = navigator.mozMobileConnection; - -console.log("The voice operator is " + cnx.voice.network.longName); - -if (cnx.voice.connected) { - console.log("The signal has a strength of " + (+cnx.voice.relSignalStrength) + "%"); -} else { - console.log("The state of the connection is: " + cnx.voice.state); -} -</pre> -<h2 id="ICC_Functionalities">ICC Functionalities</h2> -<p>The functionalities available for the <abbr title="Integrated Circuit Card">ICC</abbr> can be divided into two categories: the management of the <abbr title="Integrated Circuit Card">ICC</abbr> itself and the use of the integrated command available within the <a href="http://en.wikipedia.org/wiki/SIM_Application_Toolkit" title="http://en.wikipedia.org/wiki/SIM_Application_Toolkit">STK</a> (<em>SIM Application Toolkit</em>).</p> -<h3 id="Basic_actions">Basic actions</h3> -<p>The {{domxref("MozMobileConnection")}} provides a set of methods to deal with common behaviors on <abbr title="Integrated Circuit Card">ICC</abbr>s.</p> -<div class="note"> - <p><strong>Note:</strong> All original methods from the <code>MozMobileConnection</code> interface are fully asynchronous. They all return a {{domxref("DOMRequest")}} object which has an <code>onsuccess</code> and <code>onerror</code> event handler to handle the success or failure of the method call.</p> -</div> -<h4 id="Card_lock">Card lock</h4> -<p>As long as a card is locked, a user is unable to use it to reach its mobile network. It's possible to manage the card lock with the {{domxref("MozMobileConnection.getCardLock","getCardLock()")}}, {{domxref("MozMobileConnection.setCardLock","setCardLock()")}}, and {{domxref("MozMobileConnection.unlockCardLock","unlockCardLock()")}} methods.</p> -<p>If {{domxref("MozMobileConnection.getCardLock","getCardLock()")}} allows to get some detailed information about the lock, it's also possible to have quick info about the lock through {{domxref("MozMobileConnection.cardState")}} which returns a string representing the current state of the lock.</p> -<div class="note"> - <p><strong>Note:</strong> Even if the state change requests are successfully handled, it does not mean that the operations are necessarily successful. For that reason, any change in the card state is tracked independently through events:</p> - <ul> - <li>The {{event("icccardlockerror")}} event is triggered each time a call to {{domxref("MozMobileConnection.setCardLock","setCardLock()")}} or {{domxref("MozMobileConnection.unlockCardLock","unlockCardLock()")}} fails.</li> - <li>The {{event("cardstatechange")}} event is triggered each time the {{domxref("MozMobileConnection.cardState","cardState")}} property changes.</li> - </ul> -</div> -<pre class="brush: js">var cnx = navigator.mozMobileConnection; - -function unlockCard() { - var unlockOptions = { - lockType: "pin", - pin : prompt("Please, enter your PIN") - } - - var unlock = cnx.unlockCardLock(unlockOptions); - - unlock.onsuccess = function () { - console.log("The card has successfully handled the PIN number."); - - if (this.result.success === false) { - if (this.result.retryCount > 0) { - console.log("But you mistyped your PIN, you have " + this.result.retryCount + " tries left."); - } else { - console.log("But your card is hard locked, you need to contact your carrier to get a special unlocking code."); - } - } - } - - unlock.onerror = function () { - console.log("Hu! Something goes very wrong!") - } -} - -cnx.addEventListener('icccardlockerror', function () { - // In case of error, ask the user for his PIN again - unlockCard(); -}); - -cnx.addEventListener('cardsatechange', function () { - // In case the card state change and required to be unlocked - if (cnx.cardState === 'pinRequired') { - unlockCard(); - } -} - -// First call to unlockCard if required -if (cnx.cardState === 'pinRequired') { - unlockCard(); -} -</pre> -<h4 id="MMI_Messages">MMI Messages</h4> -<p><abbr title="Man Machine Interface">MMI</abbr> messages are human understandable code that, once typed with a phone keyboard, allow to trigger specific action from the <a class="external" href="http://en.wikipedia.org/wiki/Radio_Interface_Layer" title="Wikipedia: Radio Interface Layer">RIL</a> or get response from the network through a <a class="external" href="http://en.wikipedia.org/wiki/USSD" title="Wikipedia: Unstructured Supplementary Service Data">USSD</a> request. A common example is typing a short code to get the <a href="http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity" title="http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity">IMEI</a> phone number.</p> -<p>Such messages are sent using the {{domxref("MozMobileConnection.sendMMI()")}} method (and can be canceled with {{domxref("MozMobileConnection.cancelMMI","cancelMMI()")}}). Even if it will return a {{domxref("DOMRequest")}} object, the response to such messages are handled in two ways:</p> -<ul> - <li>If the <abbr title="Man Machine Interface">MMI</abbr> code requires sending a <abbr title="Unstructured Supplementary Service Data">USSD</abbr> request, the request's <code>success</code> means that the <abbr title="Radio Interface Layer">RIL</abbr> has successfully processed and sent the <abbr title="Unstructured Supplementary Service Data">USSD</abbr> request to the network. However, the network reply is reported through the {{event("ussdreceived")}} event.</li> - <li>If the <abbr title="Man Machine Interface">MMI</abbr> code is not associated with a <abbr title="Unstructured Supplementary Service Data">USSD</abbr> but with another <abbr title="Radio Interface Layer">RIL</abbr> request, its result, if one is needed, is sent via the returned request's <code>success</code> or <code>error</code>.</li> -</ul> -<pre class="brush: js">var cnx = navigator.mozMobileConnection; - -cnx.addEventHandler('ussdreceived', function (evt) { - console.log('Network message: ' + evt.data.message); -}); - -var MMIRequest = cnx.sendMMI(prompt('Provide a valid MMI')); - -MMIRequest.onerror = function() { - console.log("Mmmh... Something goes wrong."); -} -</pre> -<h4 id="Call_forwarding_options">Call forwarding options</h4> -<p>Call forwarding options allow to define how a call can or cannot be forwarded to another phone number.</p> -<p>Those options are handled with the {{domxref("MozMobileConnection.getCallForwardingOption","getCallForwardingOption()")}} and {{domxref("MozMobileConnection.setCallForwardingOption","setCallForwardingOption()")}} methods.</p> -<pre class="brush: js">var options = { - action : MozMobileCFInfo.CALL_FORWARD_ACTION_ENABLE, - reason : MozMobileCFInfo.CALL_FORWARD_REASON_UNCONDITIONAL, - serviceClass: MozMobileConnectionInfo.ICC_SERVICE_CLASS_VOICE, - number : prompt('To which phone number would you wish to forward the calls?'), - timeSeconds : 5 -}; - -var setOption = navigator.mozMobileConnection.setCallForwardingOption(options); - -setOption.onsuccess = function () { - console.log('Options successfully set'); -} - -setOption.onerror = function () { - console.log('Unable to set options: ' + this.error.name); -} -</pre> -<h3 id="STK_commands">STK commands</h3> -<p>The STK commands depend on many factors (carriers, chips model, etc.) but can always be accessed through the {{domxref("MozMobileConnection.icc")}} property which returns a {{domxref("MozIccManager")}} object.</p> -<div class="warning"> - <p><strong>Warning:</strong> It's recommended to use the STK command only if you already know exactly what you are doing, as a misusage can damage the chip and make it unusable.</p> -</div> -<h2 id="Specification">Specification</h2> -<p>Not part of any specification.</p> -<h2 id="See_also">See also</h2> -<ul> - <li>{{domxref("window.navigator.mozMobileConnection","navigator.mozMobileConnection")}}</li> - <li>{{domxref("MozMobileConnection")}}</li> - <li>{{domxref("MozMobileConnectionInfo")}}</li> - <li>{{domxref("MozMobileICCInfo")}}</li> - <li>{{domxref("MozMobileNetworkInfo")}}</li> - <li>{{domxref("MozMobileCFInfo")}}</li> - <li>{{domxref("MozMobileCellInfo")}}</li> - <li>{{domxref("MozIccManager")}}</li> - <li>{{domxref("MozStkCommandEvent")}}</li> -</ul> diff --git a/files/id/web/events/cached/index.html b/files/id/web/events/cached/index.html deleted file mode 100644 index 195f18f846..0000000000 --- a/files/id/web/events/cached/index.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: cached -slug: Web/Events/cached -translation_of: Archive/Events/cached ---- -<p>Event <code>cached</code> dijalankan ketika resource pada daftar application cache manifest telah terunduh, dan aplikasi sekarang ter-cache.</p> - -<h2 id="Info_Umum">Info Umum</h2> - -<dl> - <dt style="float: left; text-align: right; width: 120px;">Spesifikasi</dt> - <dd style="margin: 0 0 0 120px;"><a class="external" href="https://html.spec.whatwg.org/multipage/browsers.html#offline">Offline</a></dd> - <dt style="float: left; text-align: right; width: 120px;">Interface</dt> - <dd style="margin: 0 0 0 120px;">Event</dd> - <dt style="float: left; text-align: right; width: 120px;">Bubbles</dt> - <dd style="margin: 0 0 0 120px;">No</dd> - <dt style="float: left; text-align: right; width: 120px;">Cancelable</dt> - <dd style="margin: 0 0 0 120px;">No</dd> - <dt style="float: left; text-align: right; width: 120px;">Target</dt> - <dd style="margin: 0 0 0 120px;">applicationCache</dd> - <dt style="float: left; text-align: right; width: 120px;">Default Action</dt> - <dd style="margin: 0 0 0 120px;">None</dd> -</dl> - -<h2 id="Properti">Properti</h2> - -<table class="standard-table"> - <tbody> - <tr> - <td class="header">Properti</td> - <td class="header">Type</td> - <td class="header">Deskripsi</td> - </tr> - <tr> - <td><code>target</code></td> - <td>EventTarget (DOM element)</td> - <td>The event target (the topmost target in the DOM tree). Read Only.</td> - </tr> - <tr> - <td><code>type</code></td> - <td>string</td> - <td>The type of event. Read only.</td> - </tr> - <tr> - <td><code>canBubble</code></td> - <td>boolean</td> - <td>Does the event normally bubble? Read only.</td> - </tr> - <tr> - <td><code>cancelable</code></td> - <td>boolean</td> - <td>Is it possible to cancel the event? Read only.</td> - </tr> - </tbody> -</table> - -<h2 id="Event_Terkait">Event Terkait</h2> - -<ul> - <li>{{Event("checking")}}</li> - <li>{{Event("noupdate")}}</li> - <li>{{Event("downloading")}}</li> - <li>{{Event("progress_(appcache_event)", "progress")}}</li> - <li>{{Event("cached")}}</li> - <li>{{Event("updateready")}}</li> - <li>{{Event("obsolete")}}</li> - <li>{{Event("error_(appcache_event)", "error")}}</li> -</ul> - -<h2 id="Lihat_juga">Lihat juga</h2> - -<ul> - <li><a href="/en-US/docs/Offline_resources_in_Firefox">Using the Application Cache</a></li> -</ul> diff --git a/files/id/web/javascript/new_in_javascript/index.html b/files/id/web/javascript/new_in_javascript/index.html deleted file mode 100644 index 79ee10c2b3..0000000000 --- a/files/id/web/javascript/new_in_javascript/index.html +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: New in JavaScript -slug: Web/JavaScript/New_in_JavaScript -tags: - - ECMAScript - - JavaScript - - NeedsTranslation - - TopicStub - - Versions -translation_of: Archive/Web/JavaScript/New_in_JavaScript ---- -<div>{{jsSidebar("New_in_JS")}}</div> - -<p>This chapter contains information about JavaScript's version history and implementation status for Mozilla/SpiderMonkey-based JavaScript applications, such as Firefox.</p> - -<h2 id="ECMAScript_versions">ECMAScript versions</h2> - -<dl> - <dt><a href="/en-US/docs/Web/JavaScript/Language_Resources">Language resources</a></dt> - <dd>Learn more about the ECMAScript standards on which the JavaScript language is based on.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_5_support_in_Mozilla">ECMAScript 5 support</a></dt> - <dd>Implementation status for the current standard ECMA-262 Edition 5.1 in Mozilla-based engines and products.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_2015_support_in_Mozilla">ECMAScript 2015 support</a></dt> - <dd>Implementation status for the draft ECMA-262 Edition 6 (ES2015) in Mozilla-based engines and products.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_Next_support_in_Mozilla">ECMAScript Next support</a></dt> - <dd>Implementation status for upcoming ECMA-262 features as per the yearly (ES2016/ES2017/ES2018/...) release schedule in Mozilla-based engines and products.</dd> -</dl> - -<h2 id="JavaScript_release_notes">JavaScript release notes</h2> - -<dl> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/Firefox_JavaScript_changelog">Firefox JavaScript changelog</a></dt> - <dd>See this changelog for JavaScript features implemented in Firefox 5 and later.</dd> -</dl> - -<h2 id="JavaScript_versions">JavaScript versions</h2> - -<p><strong>Deprecated</strong> ({{deprecated_inline}}). The explicit versioning and opt-in of language features was Mozilla-specific and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=867609">are in process of being removed</a>. Firefox 4 was the last version which referred to a JavaScript version (1.8.5). With new ECMA standards, JavaScript language features are now often mentioned with their initial definition in ECMA-262 Editions such as ECMAScript 2015.</p> - -<p>JavaScript was released as version 1.0 in March 1996 in Netscape Navigator 2.0 and Internet Explorer 2.0.</p> - -<dl> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.1">JavaScript 1.1</a></dt> - <dd>Version shipped in Netscape Navigator 3.0. Released on August 19, 1996.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.2">JavaScript 1.2</a></dt> - <dd>Version shipped in Netscape Navigator 4.0-4.05. Released on June 11, 1997.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.3">JavaScript 1.3</a></dt> - <dd>Version shipped in Netscape Navigator 4.06-4.7x. Released on October 19, 1998.<br> - Standardization work to be compliant with ECMA-262 1st and 2nd Edition.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.4">JavaScript 1.4</a></dt> - <dd>Version shipped with Netscape's server-side JavaScript. Released in 1999.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.5">JavaScript 1.5</a></dt> - <dd>Version shipped in Netscape Navigator 6.0 and Firefox 1.0. Release on November 14, 2000.<br> - Standardization work to be compliant with ECMA-262 3rd Edition.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.6">JavaScript 1.6</a></dt> - <dd>Version shipped in Firefox 1.5. Released in November 2005.<br> - Includes ECMAScript for XML (E4X), new <code>Array</code> methods plus <code>String</code> and <code>Array</code> generics.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.7">JavaScript 1.7</a></dt> - <dd>Version shipped in Firefox 2. Released in October 2006.<br> - Includes generators, iterators, array comprehensions, <code>let</code> expressions, and destructuring assignment.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8">JavaScript 1.8</a></dt> - <dd>Version shipped in Firefox 3. Released in June 2008.<br> - Includes expression closures, generator expressions and <code>Array.reduce()</code></dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8.1">JavaScript 1.8.1</a></dt> - <dd>Version shipped in Firefox 3.5. Released on June 30, 2009.<br> - Includes the TraceMonkey JIT and supports native JSON.</dd> - <dt>JavaScript 1.8.2</dt> - <dd>Version shipped in Firefox 3.6. Released June 22, 2009.<br> - Includes only minor changes.</dd> - <dt><a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8.5">JavaScript 1.8.5</a></dt> - <dd>Version shipped in Firefox 4. Released July 27, 2010.<br> - Includes many new features for ECMA-262 Edition 5 compliance.<br> - This is the last JavaScript version.</dd> -</dl> |