Eve.js icon indicating copy to clipboard operation
Eve.js copied to clipboard

Enhancement: Configurable library namespace

Open bolora opened this issue 9 years ago • 2 comments

Would like to be able to configure the library namespace.

For example, before loading Eve.js you could have win.eve_namespace = foobar;

Then you can use the library as such: foobar.scope, foobar.register, foobar.attach, etc

bolora avatar Jun 26 '15 19:06 bolora

Scopes are recursive, so you could actually do something like:

Eve.scope('.foobar', function() {

    this.scope('.scope', /* ... */);

    this.scope('.register', /* ... */);

    // etc...

});

Does that solve your use case?

Yuffster avatar Jun 26 '15 19:06 Yuffster

Though, if you're looking to actually use this in production, I have a vanilla implementation that supports all A-grade browsers, handles switching between component states, and might actually be smaller than Eve.js.

Yuffster avatar Jun 27 '15 02:06 Yuffster