• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5var utils = require('utils');
6
7var AutomationEventImpl = function(type, target) {
8  this.propagationStopped = false;
9
10  // TODO(aboxhall): make these read-only properties
11  this.type = type;
12  this.target = target;
13  this.eventPhase = Event.NONE;
14};
15
16AutomationEventImpl.prototype = {
17  stopPropagation: function() {
18    this.propagationStopped = true;
19  }
20};
21
22exports.AutomationEvent = utils.expose(
23    'AutomationEvent',
24    AutomationEventImpl,
25    { functions: ['stopPropagation'],
26      readonly: ['type', 'target', 'eventPhase'] });
27