From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../vi/web/css/-ms-scroll-snap-points-y/index.html | 89 ---------- .../global_objects/object/observe/index.html | 193 --------------------- 2 files changed, 282 deletions(-) delete mode 100644 files/vi/web/css/-ms-scroll-snap-points-y/index.html delete mode 100644 files/vi/web/javascript/reference/global_objects/object/observe/index.html (limited to 'files/vi/web') 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 ---- -
{{CSSRef}}
- -
{{non-standard_header}}
- -
 
- -

The -ms-scroll-snap-points-y CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis.

- -

{{cssinfo}}

- -

Syntax

- -

Values

- -
-

Note: a <length-percentage> is a value that can be either a {{cssxref("<length>")}} or a {{cssxref("<percentaqe>")}}.

-
- -
-
snapInterval( <length-percentage>, <length-percentage> )
-
-

Specifies a starting snap-point followed by the interval between all snap-points.

- -
    -
  • The first value specifies where the first snap-point will be placed.
  • -
  • The second value specifies the distance between subsequent snap-points both above and below the initial snap-point.
  • -
-
-
snapList( <length-percentage># )
-
-

Specifies the position of individual snap-points as a comma-separated list of values, each of which represents a zoom factor.

- -
    -
  • If any value is less than {{CSSXref("-ms-scroll-limit-y-min")}} , then {{cssxref("-ms-scroll-limit-y-min")}} is used.
  • -
  • If any value is greater than {{CSSXref("-ms-scroll-limit-y-max")}}, then {{cssxref("-ms-scroll-limit-y-max")}} is used.
  • -
-
-
- -

Formal syntax

- -
  {{csssyntax}}
-
- -

Examples

- -

This example demonstrates both types of values for the -ms-scroll-snap-points-y 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 -ms-scroll-snap-points-y property behaves identically to the {{cssxref("-ms-scroll-snap-points-x")}} property, but along the y-axis.)

- -
.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;
-}
-
- -

Specifications

- -

Not part of any specification.

- -

Remarks

- -

This property requires Windows 8 or later.

- -

This property has no effect on non-scrollable elements.

- -

Starting with Windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.

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 ---- -
{{JSRef}}
- -

Object.observe() đượ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.

- -

Cú pháp

- -
Object.observe(obj, callback[, acceptList])
- -

Tham số

- -
-
obj
-
Đối tượng được quan sát.
-
callback
-
Hàm được gọi mỗi lần có thay đổi trong obj, với những tham số sau: -
-
changes
-
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: -
    -
  • name: Tên thuộc tính đã thay đổi.
  • -
  • object: Đối tượng được thay đổi.
  • -
  • type: Một chuỗi cho biết loại thay đổi đang diễn ra. Có thể là "add", "update", hoặc "delete".
  • -
  • oldValue: Chỉ có cho loại "update" và "delete". Cho biết giá trị trước khi thay đổi.
  • -
-
-
-
-
acceptList
-
Danh sách các loại thay đổi được quan sát. Nếu bỏ qua, mặc định là ["add", "update", "delete", "reconfigure", "setPrototype", "preventExtensions"].
-
- -

Mô tả

- -

Hàm callback được gọi mỗi khi có thay đổi trong obj, với một mảng các đối tượng chứa thông tin về sự thay đổi.

- -

Ví dụ

- -

Ghi lại tất cả sáu loại thay đổi khác nhau

- -
var obj = {
-  foo: 0,
-  bar: 1
-};
-
-Object.observe(obj, function(changes) {
-  console.log(changes);
-});
-
-obj.baz = 2;
-// [{name: 'baz', object: <obj>, type: 'add'}]
-
-obj.foo = 'hello';
-// [{name: 'foo', object: <obj>, type: 'update', oldValue: 0}]
-
-delete obj.baz;
-// [{name: 'baz', object: <obj>, type: 'delete', oldValue: 2}]
-
-Object.defineProperty(obj, 'foo', {writable: false});
-// [{name: 'foo', object: <obj>, type: 'reconfigure'}]
-
-Object.setPrototypeOf(obj, {});
-// [{name: '__proto__', object: <obj>, type: 'setPrototype', oldValue: <prototype>}]
-
-Object.seal(obj);
-// [
-//   {name: 'foo', object: <obj>, type: 'reconfigure'},
-//   {name: 'bar', object: <obj>, type: 'reconfigure'},
-//   {object: <obj>, type: 'preventExtensions'}
-// ]
-
- -

Ràng buộc dữ liệu

- -
// 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();
-    }
-  });
-});
-
- -

Loại thay đổi tùy chỉnh

- -
// 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
-
- -

Đặc tả

- -

Strawman proposal for ECMAScript 7.

- -

Khả năng tương thích trình duyệt

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
Tính năngChromeFirefox (Gecko)Internet ExplorerOperaSafari
Hỗ trợ cơ bản{{CompatChrome("36")}}{{CompatNo}}{{CompatNo}}{{CompatOpera("23")}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
Tính năngAndroidChrome dành cho AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Hỗ trợ cơ bản{{CompatNo}}{{CompatChrome("36")}}{{CompatNo}}{{CompatNo}}{{CompatOpera("23")}}{{CompatNo}}
-
- -

Xem thêm

- - -- cgit v1.2.3-54-g00ecf