documentation update
-
Thatcher
- State changed from new to open
- Assigned user set to Thatcher
- Milestone set to 1.2.x
No Envjs is both a Function and an Object and the former, when called ( was meant to extend the internal object Envjs.{} ) did have a bug, or rather a 'disappeared feature'. This is resloved in 1.2 but know I need to clarify that. Envjs is only a one parameter function
Envjs(options) where options is a {}, simple serves to override values preset internally. This is both Envjs platform and hook interface. We used to support
Envjs('http://www.google.com', {
logLevel: Envjs.DEBUG, scriptTypes: { 'text/javascript': true }});
which was actually meant to be an improvement on
Envjs({
logLevel: Envjs.DEBUG, scriptTypes: { 'text/javascript': true }});
window.location = ...
But we forgot to still allow that, eg we expect the second arg to be the overriding properties. Now, we are supporting Envjs only as an extension function ie
Envjs({
logLevel: Envjs.DEBUG, scriptTypes: { 'text/javascript': true }});
and there are no instance properties so its basically a static factory pattern.
I won't close this until I update the actual doc describing the current api for treating Envjs as a function.
Thatcher
-
Thatcher
- State changed from open to resolved
- Tag set to envjs location policy deprecated
ok I updated the refactor to allow the 1.1 methods of simultaneously setting policy for Envjs and setting the window.location.
Note: we are deprecating this though we will continue to support it for the duration of 1.0, 1.1, and 1.2. At some point Envjs as a function will only support a single arg as an object to set policy.
Thanks for the ticket!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.