What would happen if jQuery would "force" a "singleton" for a host
document ?

What if :

$()
$("html")
$( document )
... etc

Would all point to the same jQuery instance ? One document one jQuery.
Do we already have it in core.js :

// A central reference to the root jQuery(document)
        rootjQuery,

And can we "just use it" like this :

  // Handle $(""), $(null), or $(undefined)
                if (!selector) {
                    return rootjQuery; // originaly returning 'this'
                }

Is there anything that "obviously" renders this "impossible" ?
This (for sure) will provoke some people to think about using
potentially removed nodes, or attributes "changed by something else".
At least some rudimentary ("free" ?) mechanism, for multiple callers/
users operating on a single document, in the same time.

And. It seems this will allow jQuery "internals" to have (at least
some) way of knowing that  rootjQuery.length has changed. By
"something or someone" ;o)

--DBJ

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to