var NodeFragment = function(document, params) {
     Fragment.call(this, document);
     this.node = params.node;
 var NodeFragment = function(document, params) {
     Fragment.call(this, document);
     this.node = params.node;
 };
 NodeFragment.prototype = Object.create(Fragment.prototype);
 $.extend(NodeFragment.prototype, {
     isValid: function() {
         return this.document.containsNode(this.node);
 };
 NodeFragment.prototype = Object.create(Fragment.prototype);
 $.extend(NodeFragment.prototype, {
     isValid: function() {
         return this.document.containsNode(this.node);
 };
 RangeFragment.prototype = Object.create(Fragment.prototype);
 $.extend(RangeFragment.prototype, {
     isValid: function() {
         return this.document.containsNode(this.startNode) && this.document.containsNode(this.endNode);
     },
 };
 RangeFragment.prototype = Object.create(Fragment.prototype);
 $.extend(RangeFragment.prototype, {
     isValid: function() {
         return this.document.containsNode(this.startNode) && this.document.containsNode(this.endNode);
     },