aboutsummaryrefslogtreecommitdiff
path: root/files/vi/web
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 21:46:22 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 21:46:22 -0500
commita065e04d529da1d847b5062a12c46d916408bf32 (patch)
treefe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/vi/web
parent218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff)
downloadtranslated-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/vi/web')
-rw-r--r--files/vi/web/css/-ms-scroll-snap-points-y/index.html89
-rw-r--r--files/vi/web/javascript/reference/global_objects/object/observe/index.html193
2 files changed, 0 insertions, 282 deletions
diff --git a/files/vi/web/css/-ms-scroll-snap-points-y/index.html b/files/vi/web/css/-ms-scroll-snap-points-y/index.html
deleted file mode 100644
index 2fb27bbef7..0000000000
--- a/files/vi/web/css/-ms-scroll-snap-points-y/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: '-ms-scroll-snap-points-y'
-slug: Web/CSS/-ms-scroll-snap-points-y
-translation_of: Archive/Web/CSS/-ms-scroll-snap-points-y
----
-<div>{{CSSRef}}</div>
-
-<div>{{non-standard_header}}</div>
-
-<div> </div>
-
-<p>The <strong><code>-ms-scroll-snap-points-y</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> property is a <a href="/en-US/docs/Web/CSS/Microsoft_CSS_extensions">Microsoft extension</a> that specifies where snap-points will be located along the y-axis.</p>
-
-<p>{{cssinfo}}</p>
-
-<h2 id="Syntax" name="Syntax">Syntax</h2>
-
-<h3 id="Values" name="Values">Values</h3>
-
-<div class="note">
-<p>Note: a <code>&lt;length-percentage&gt;</code> is a value that can be either a {{cssxref("&lt;length&gt;")}} or a {{cssxref("&lt;percentaqe&gt;")}}.</p>
-</div>
-
-<dl>
- <dt><code>snapInterval( &lt;length-percentage&gt;, &lt;length-percentage&gt; )</code></dt>
- <dd>
- <p>Specifies a starting snap-point followed by the interval between all snap-points.</p>
-
- <ul>
- <li>The first value specifies where the first snap-point will be placed.</li>
- <li>The second value specifies the distance between subsequent snap-points both above and below the initial snap-point.</li>
- </ul>
- </dd>
- <dt><code>snapList( &lt;length-percentage&gt;# )</code></dt>
- <dd>
- <p>Specifies the position of individual snap-points as a comma-separated list of values, each of which represents a zoom factor.</p>
-
- <ul>
- <li>If any value is less than {{CSSXref("-ms-scroll-limit-y-min")}} , then {{cssxref("-ms-scroll-limit-y-min")}} is used.</li>
- <li>If any value is greater than {{CSSXref("-ms-scroll-limit-y-max")}}, then {{cssxref("-ms-scroll-limit-y-max")}} is used.</li>
- </ul>
- </dd>
-</dl>
-
-<h3 id="Formal_syntax" name="Formal_syntax">Formal syntax</h3>
-
-<pre class="syntaxbox"> {{csssyntax}}
-</pre>
-
-<h2 id="Examples" name="Examples">Examples</h2>
-
-<p>This example demonstrates both types of values for the <code>-ms-scroll-snap-points-y</code> property. In the first selector, the first snap-point is at 0%, and the interval is set to 100%. In the second selector, each snap-point is listed separately — 100%, 200%, 300%, and so on. (The <code>-ms-scroll-snap-points-y</code> property behaves identically to the {{cssxref("-ms-scroll-snap-points-x")}} property, but along the y-axis.)</p>
-
-<pre class="brush: css">.container {
- overflow-x: auto;
- overflow-y: hidden;
- -ms-scroll-snap-type: mandatory;
- -ms-scroll-snap-points-y: snapInterval(0%, 100%);
- width: 480px;
- height: 270px;
-}
-
-.imageContainer {
- -ms-scroll-chaining: chained;
- -ms-overflow-style: none;
- -ms-content-zooming: zoom;
- -ms-scroll-rails: none;
- -ms-scroll-limit-y-min: 100%;
- -ms-scroll-limit-y-max: 500%;
- -ms-scroll-snap-type: proximity;
- -ms-scroll-snap-points-y: snapList(100%, 200%, 300%, 400%, 500%);
- -ms-overflow-style: none;
- width: 480px;
- height: 270px;
- overflow: auto;
-}
-</pre>
-
-<h2 id="Specifications" name="Specifications">Specifications</h2>
-
-<p>Not part of any specification.</p>
-
-<h2 id="Remarks" name="Remarks">Remarks</h2>
-
-<p>This property requires Windows 8 or later.</p>
-
-<p>This property has no effect on non-scrollable elements.</p>
-
-<p>Starting with Windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.</p>
diff --git a/files/vi/web/javascript/reference/global_objects/object/observe/index.html b/files/vi/web/javascript/reference/global_objects/object/observe/index.html
deleted file mode 100644
index f9074ea94e..0000000000
--- a/files/vi/web/javascript/reference/global_objects/object/observe/index.html
+++ /dev/null
@@ -1,193 +0,0 @@
----
-title: Object.observe()
-slug: Web/JavaScript/Reference/Global_Objects/Object/observe
-tags:
- - ECMAScript7
- - Experimental
- - JavaScript
- - Method
- - Object
-translation_of: Archive/Web/JavaScript/Object.observe
----
-<div>{{JSRef}}</div>
-
-<p><strong><code>Object.observe()</code></strong> được sử dụng để đồng bộ quan sát những thay đổi cho một đối tượng. Nó cung cấp một dòng thay đổi trong thứ tự mà chúng xảy ra.</p>
-
-<h2 id="Cú_pháp">Cú pháp</h2>
-
-<pre class="syntaxbox"><code>Object.observe(<var>obj</var>, <var>callback</var>[, <var>acceptList</var>])</code></pre>
-
-<h3 id="Tham_số">Tham số</h3>
-
-<dl>
- <dt><code>obj</code></dt>
- <dd>Đối tượng được quan sát.</dd>
- <dt><code>callback</code></dt>
- <dd>Hàm được gọi mỗi lần có thay đổi trong <code>obj</code>, với những tham số sau:
- <dl>
- <dt><code>changes</code></dt>
- <dd>Một mảng các đối tượng mô tả sự thay đổi. Mỗi đối tượng chứa các thuộc tính:
- <ul>
- <li><strong><code>name</code></strong>: Tên thuộc tính đã thay đổi.</li>
- <li><strong><code>object</code></strong>: Đối tượng được thay đổi.</li>
- <li><strong><code>type</code></strong>: Một chuỗi cho biết loại thay đổi đang diễn ra. Có thể là <code>"add"</code>, <code>"update"</code>, hoặc <code>"delete"</code>.</li>
- <li><strong><code>oldValue</code></strong>: Chỉ có cho loại <code>"update"</code> và <code>"delete"</code>. Cho biết giá trị trước khi thay đổi.</li>
- </ul>
- </dd>
- </dl>
- </dd>
- <dt><code>acceptList</code></dt>
- <dd>Danh sách các loại thay đổi được quan sát. Nếu bỏ qua, mặc định là <code>["add", "update", "delete", "reconfigure", "setPrototype", "preventExtensions"]</code>.</dd>
-</dl>
-
-<h2 id="Mô_tả">Mô tả</h2>
-
-<p>Hàm<code> callback</code> được gọi mỗi khi có thay đổi trong <code>obj</code>, với một mảng các đối tượng chứa thông tin về sự thay đổi.</p>
-
-<h2 id="Ví_dụ">Ví dụ</h2>
-
-<h3 id="Ghi_lại_tất_cả_sáu_loại_thay_đổi_khác_nhau">Ghi lại tất cả sáu loại thay đổi khác nhau</h3>
-
-<pre class="brush: js">var obj = {
- foo: 0,
- bar: 1
-};
-
-Object.observe(obj, function(changes) {
- console.log(changes);
-});
-
-obj.baz = 2;
-// [{name: 'baz', object: &lt;obj&gt;, type: 'add'}]
-
-obj.foo = 'hello';
-// [{name: 'foo', object: &lt;obj&gt;, type: 'update', oldValue: 0}]
-
-delete obj.baz;
-// [{name: 'baz', object: &lt;obj&gt;, type: 'delete', oldValue: 2}]
-
-Object.defineProperty(obj, 'foo', {writable: false});
-// [{name: 'foo', object: &lt;obj&gt;, type: 'reconfigure'}]
-
-Object.setPrototypeOf(obj, {});
-// [{name: '__proto__', object: &lt;obj&gt;, type: 'setPrototype', oldValue: &lt;prototype&gt;}]
-
-Object.seal(obj);
-// [
-// {name: 'foo', object: &lt;obj&gt;, type: 'reconfigure'},
-// {name: 'bar', object: &lt;obj&gt;, type: 'reconfigure'},
-// {object: &lt;obj&gt;, type: 'preventExtensions'}
-// ]
-</pre>
-
-<h3 id="Ràng_buộc_dữ_liệu">Ràng buộc dữ liệu</h3>
-
-<pre class="brush: js">// Mô hình user
-var user = {
- id: 0,
- name: 'Brendan Eich',
- title: 'Mr.'
-};
-
-// Lời chào tới user
-function updateGreeting() {
- user.greeting = 'Hello, ' + user.title + ' ' + user.name + '!';
-}
-updateGreeting();
-
-Object.observe(user, function(changes) {
- changes.forEach(function(change) {
- // Bất kỳ khi nào tên hoặc danh hiệu thay đổi, gọi updateGreeting()
- if (change.name === 'name' || change.name === 'title') {
- updateGreeting();
- }
- });
-});
-</pre>
-
-<h3 id="Loại_thay_đổi_tùy_chỉnh">Loại thay đổi tùy chỉnh</h3>
-
-<pre class="brush: js">// Một điểm trên một mặt phẳng
-var point = {x: 0, y: 0, distance: 0};
-
-function setPosition(pt, x, y) {
- // Thực hiện thay đổi tùy chỉnh
- Object.getNotifier(pt).performChange('reposition', function() {
- var oldDistance = pt.distance;
- pt.x = x;
- pt.y = y;
- pt.distance = Math.sqrt(x * x + y * y);
- return {oldDistance: oldDistance};
- });
-}
-
-Object.observe(point, function(changes) {
- console.log('Distance change: ' + (point.distance - changes[0].oldDistance));
-}, ['reposition']);
-
-setPosition(point, 3, 4);
-// Distance change: 5
-</pre>
-
-<h2 id="Đặc_tả">Đặc tả</h2>
-
-<p><a href="https://github.com/arv/ecmascript-object-observe">Strawman proposal for ECMAScript 7</a>.</p>
-
-<h2 id="Khả_năng_tương_thích_trình_duyệt">Khả năng tương thích trình duyệt</h2>
-
-<div>{{CompatibilityTable}}</div>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Tính năng</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Hỗ trợ cơ bản</td>
- <td>{{CompatChrome("36")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatOpera("23")}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Tính năng</th>
- <th>Android</th>
- <th>Chrome dành cho Android</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Hỗ trợ cơ bản</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome("36")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatOpera("23")}}</td>
- <td>{{CompatNo}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<h2 id="Xem_thêm">Xem thêm</h2>
-
-<ul>
- <li>{{jsxref("Object.unobserve()")}} {{experimental_inline}}</li>
- <li>{{jsxref("Array.observe()")}} {{experimental_inline}}</li>
-</ul>