Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: Source/core/dom/DOMPointReadOnly.js

Issue 399923002: [WIP] Implement DOMPoint of geometry interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698