diff options
-rw-r--r-- | lib/bzpage.js | 10 | ||||
-rw-r--r-- | lib/rhbzpage.js | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js index aec6632..9f504c0 100644 --- a/lib/bzpage.js +++ b/lib/bzpage.js @@ -14,11 +14,17 @@ var BZPage = function BZPage(doc, config) { // initialize dynamic properties this.doc = doc; console.log("Now we are inside!"); + console.log("this = " + this); }; -exports.BZPage = apiUtils.publicConstructor(BZPage); - BZPage.prototype.getURL = function getURL () { console.log("url = " + this.doc.location.href); return this.doc.location.href; }; + +BZPage.prototype.toString = function toString () { + return "[Object BZPage]"; +}; + +//exports.BZPage = apiUtils.publicConstructor(BZPage); +exports.BZPage = BZPage;
\ No newline at end of file diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index da3bf92..6127c33 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -29,7 +29,12 @@ var RHBugzillaPage = function RHBugzillaPage(doc, config) { console.log("Now we are outside!"); }; // END OF RHBugzillaPage CONSTRUCTOR +RHBugzillaPage.prototype.toString = function toString () { + return ("[Object RHBugzillaPage]"); +}; + RHBugzillaPage.prototype = util.heir(BZPage.prototype); RHBugzillaPage.prototype.constructor = RHBugzillaPage; -exports.RHBugzillaPage = apiUtils.publicConstructor(RHBugzillaPage);
\ No newline at end of file +//exports.RHBugzillaPage = apiUtils.publicConstructor(RHBugzillaPage); +exports.RHBugzillaPage = RHBugzillaPage;
\ No newline at end of file |