My knowledge of prototypes is still in its infancy, so please bear with me. I have a main object that is initialised via var book = new book();
I initiate some prototype functions:
book = function(){
this.init();
}
book.prototype.init = function() {
//etc.
}
And I also initialise an object:
book.prototype.bookmarks = {
init : function(){
//How can I access book from this function?
}
}
I mean I could use book.someFunction() but I'm just curious if there's a way to properly access the top level object. Sorry if this is a stupid question, I'll try and clarify anything unclear. Thanks