Home | History | Annotate | Download | only in automation
      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 var utils = require('utils');
      6 
      7 var 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 
     16 AutomationEventImpl.prototype = {
     17   stopPropagation: function() {
     18     this.propagationStopped = true;
     19   }
     20 };
     21 
     22 exports.AutomationEvent = utils.expose(
     23     'AutomationEvent',
     24     AutomationEventImpl,
     25     { functions: ['stopPropagation'],
     26       readonly: ['type', 'target', 'eventPhase'] });
     27