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

Side by Side Diff: Source/core/testing/Internals.js

Issue 362993004: Implement Blink-in-JS for DOM attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 "use strict"; 5 "use strict";
6 6
7 installClass("Internals", function(global) { 7 installClass("Internals", function(global) {
8 var InternalsPrototype = Object.create(Element.prototype); 8 var InternalsPrototype = Object.create(Element.prototype);
9 9
10 InternalsPrototype.doNothing = function() { 10 InternalsPrototype.doNothing = function() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 node.addEventListener("click", function () { 78 node.addEventListener("click", function () {
79 node.innerHTML = "clicked"; 79 node.innerHTML = "clicked";
80 }); 80 });
81 } 81 }
82 82
83 InternalsPrototype.clickNode = function(document, node) { 83 InternalsPrototype.clickNode = function(document, node) {
84 var event = new MouseEvent("click", { bubbles: true, cancelable: true, v iew: global }); 84 var event = new MouseEvent("click", { bubbles: true, cancelable: true, v iew: global });
85 node.dispatchEvent(event); 85 node.dispatchEvent(event);
86 } 86 }
87 87
88 InternalsPrototype.readonlyShortAttributeGetter = function() {
89 return 123;
90 }
91
92 InternalsPrototype.shortAttributeGetter = function() {
93 return this.shortAttribute_;
94 }
95
96 InternalsPrototype.shortAttributeSetter = function(value) {
97 this.shortAttribute_ = value;
98 }
99
100 InternalsPrototype.stringAttributeGetter = function() {
101 return this.stringAttribute_;
102 }
103
104 InternalsPrototype.stringAttributeSetter = function(value) {
105 this.stringAttribute_ = value;
106 }
107
108 InternalsPrototype.nodeAttributeGetter = function() {
109 return this.nodeAttribute_;
110 }
111
112 InternalsPrototype.nodeAttributeSetter = function(value) {
113 this.nodeAttribute_ = value;
114 }
abarth-chromium 2014/07/02 14:26:31 This is pretty ugly. It would be much nicer to be
haraken 2014/07/02 15:47:19 Yeah, I'm on the same page. Even if it's hard to
115
88 return InternalsPrototype; 116 return InternalsPrototype;
89 }); 117 });
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698