OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 'use strict'; |
| 6 |
| 7 installClass('DOMPointReadOnly', function(global) { |
| 8 |
| 9 var DOMPointReadOnlyPrototype = {}; |
| 10 |
| 11 DOMPointReadOnlyPrototype.initialize = function() { |
| 12 this.m_x = 0; |
| 13 this.m_y = 0; |
| 14 this.m_z = 0; |
| 15 this.m_w = 1; |
| 16 }; |
| 17 |
| 18 Object.defineProperty(DOMPointReadOnlyPrototype, "x", { |
| 19 get: function() { return this.m_x; }, |
| 20 }); |
| 21 |
| 22 Object.defineProperty(DOMPointReadOnlyPrototype, "y", { |
| 23 get: function() { return this.m_y; }, |
| 24 }); |
| 25 |
| 26 Object.defineProperty(DOMPointReadOnlyPrototype, "z", { |
| 27 get: function() { return this.m_z; }, |
| 28 }); |
| 29 |
| 30 Object.defineProperty(DOMPointReadOnlyPrototype, "w", { |
| 31 get: function() { return this.m_w; }, |
| 32 }); |
| 33 |
| 34 return DOMPointReadOnlyPrototype; |
| 35 }); |
OLD | NEW |