You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
If you pass an ender object as an argument to the ender function, the latter result doesn't maintain the selector property of the previous object.
Take the example:
varx=ender('body');vary=ender(x);x.selector;// 'body'y.selector;// undefined and not 'body'
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2251601-maintaining-the-selector-property-when-passing-an-ender-object-as-argument?utm_campaign=plugin&utm_content=tracker%2F165667&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F165667&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
Hello @ryanve the use case was strictly for logging/debugging, where a representation of the selector that generated the collection was useful to identify it.
Also in terms of performance, if we have a way to mark the Ender collections - be it selector property or any other - should we need to iterate them again in the constructor?
@mariomc Consider creating a wrapper around ender() that adds what you need for debugging:
var$=enderender.debug=function(){$=function(){varobject=ender.apply(this,arguments)returnobject.debug.apply(object,arguments)}}ender.prototype.debug=function(query,context){// Give `this` extra debugging properties here beforing returning itreturnthis}
Use $ in your code like normal. Call ender.debug() to activate debugging.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you pass an ender object as an argument to the ender function, the latter result doesn't maintain the selector property of the previous object.
Take the example:
The text was updated successfully, but these errors were encountered: