Reputation: 7631
I have an instance of my class..
var controller = new (function () {
// Contains lot of methods
});
Is it possible that i can make the instance of this Object across all Windows. Without including this file in other pages, i can call the instance of this Object every where.
Upvotes: 0
Views: 273
Reputation: 13477
Without including this file in other pages, i can call the instance of this Object every where.
No you cannot. There are no cross window Javascript objects as far as I know and I assume that there would not be for security reasons. Though I guess parent windows can talk to child windows. So you could append something to a parent window and pass data that way but I would not recommend it.
Upvotes: 2