# Code coverage report for lib/attributes/keyCodedEvent.js

## Statements: 100% (5 / 5) Branches: 100% (2 / 2) Functions: 100% (1 / 1) Lines: 100% (5 / 5) Ignored: none

All files » lib/attributes/ » keyCodedEvent.js

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    301

    1

    6
    1

    5

     var EventDataBinding = require("./event");

    /**
     */

    module.exports = EventDataBinding.extend({

      /**
       */

      event: "keydown",

      /**
       */

      keyCodes: [],

      /**
       */

      _onEvent: function(event) {

        if (!~this.keyCodes.indexOf(event.keyCode)) {
          return;
        }

        EventDataBinding.prototype._onEvent.apply(this, arguments);
      }
    });