Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions lib/metamorph.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

(function(window) {

var K = function(){},
guid = 0,
var guid = 0,
document = window.document,

// Feature-detect the W3C range API, the extended check is for IE9 which only partially supports ranges
Expand Down Expand Up @@ -39,12 +38,10 @@
// Takes a string of HTML as the argument.

var Metamorph = function(html) {
var self;
var self = this;

if (this instanceof Metamorph) {
self = this;
} else {
self = new K();
if (!(self instanceof Metamorph)) {
return new Metamorph(html);
}

self.innerHTML = html;
Expand All @@ -55,8 +52,6 @@
return self;
};

K.prototype = Metamorph.prototype;

var rangeFor, htmlFunc, removeFunc, outerHTMLFunc, appendToFunc, afterFunc, prependFunc, startTagFunc, endTagFunc;

outerHTMLFunc = function() {
Expand Down