OLD | NEW |
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 var utils = require('utils'); | 5 var utils = require('utils'); |
6 | 6 |
7 var AutomationEventImpl = function(type, target) { | 7 function AutomationEventImpl(type, target) { |
8 this.propagationStopped = false; | 8 this.propagationStopped = false; |
9 | 9 |
10 // TODO(aboxhall): make these read-only properties | 10 // TODO(aboxhall): make these read-only properties |
11 this.type = type; | 11 this.type = type; |
12 this.target = target; | 12 this.target = target; |
13 this.eventPhase = Event.NONE; | 13 this.eventPhase = Event.NONE; |
14 }; | 14 } |
15 | 15 |
16 AutomationEventImpl.prototype = { | 16 AutomationEventImpl.prototype = { |
| 17 __proto__: null, |
17 stopPropagation: function() { | 18 stopPropagation: function() { |
18 this.propagationStopped = true; | 19 this.propagationStopped = true; |
19 } | 20 }, |
20 }; | 21 }; |
21 | 22 |
22 function AutomationEvent() { | 23 function AutomationEvent() { |
23 privates(AutomationEvent).constructPrivate(this, arguments); | 24 privates(AutomationEvent).constructPrivate(this, arguments); |
24 } | 25 } |
25 utils.expose(AutomationEvent, AutomationEventImpl, { | 26 utils.expose(AutomationEvent, AutomationEventImpl, { |
26 functions: [ | 27 functions: [ |
27 'stopPropagation', | 28 'stopPropagation', |
28 ], | 29 ], |
29 readonly: [ | 30 readonly: [ |
30 'type', | 31 'type', |
31 'target', | 32 'target', |
32 'eventPhase', | 33 'eventPhase', |
33 ], | 34 ], |
34 }); | 35 }); |
35 | 36 |
36 exports.$set('AutomationEvent', AutomationEvent); | 37 exports.$set('AutomationEvent', AutomationEvent); |
OLD | NEW |