native-document 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -331,7 +331,7 @@ var NativeDocument = (function (exports) {
331
331
  };
332
332
  ObservableItem.prototype.get = ObservableItem.prototype.check;
333
333
 
334
- ObservableItem.prototype.is = function(value) {
334
+ ObservableItem.prototype.when = function(value) {
335
335
  return {$target: value, $observer: this};
336
336
  };
337
337
 
@@ -505,7 +505,22 @@ var NativeDocument = (function (exports) {
505
505
  "Suspend",
506
506
  "TimeUpdate",
507
507
  "VolumeChange",
508
- "Waiting"
508
+ "Waiting",
509
+
510
+ "TouchCancel",
511
+ "TouchEnd",
512
+ "TouchMove",
513
+ "TouchStart",
514
+ "AnimationEnd",
515
+ "AnimationIteration",
516
+ "AnimationStart",
517
+ "TransitionEnd",
518
+ "Copy",
519
+ "Cut",
520
+ "Paste",
521
+ "FocusIn",
522
+ "FocusOut",
523
+ "ContextMenu"
509
524
  ];
510
525
 
511
526
  function NDElement(element) {
@@ -523,14 +538,14 @@ var NativeDocument = (function (exports) {
523
538
  NDElement.prototype['onPrevent'+event] = function(callback) {
524
539
  this.$element.addEventListener(eventName, function(event) {
525
540
  event.preventDefault();
526
- callback(event);
541
+ callback && callback(event);
527
542
  });
528
543
  return this;
529
544
  };
530
545
  NDElement.prototype['onStop'+event] = function(callback) {
531
546
  this.$element.addEventListener(eventName, function(event) {
532
547
  event.stopPropagation();
533
- callback(event);
548
+ callback && callback(event);
534
549
  });
535
550
  return this;
536
551
  };
@@ -538,7 +553,7 @@ var NativeDocument = (function (exports) {
538
553
  this.$element.addEventListener(eventName, function(event) {
539
554
  event.stopPropagation();
540
555
  event.preventDefault();
541
- callback(event);
556
+ callback && callback(event);
542
557
  });
543
558
  return this;
544
559
  };