Make sure that the removeEvent and buildFragment private functions are exposed (to help with access across modules). The final API for each of these is very much in flux and will likely change before the final release. Fixes #7011.

This commit is contained in:
jeresig 2010-09-08 18:13:35 -04:00
parent bca5765502
commit acb162a697
4 changed files with 8 additions and 8 deletions

View File

@ -109,7 +109,7 @@ jQuery.fn = jQuery.prototype = {
} }
} else { } else {
ret = buildFragment( [ match[1] ], [ doc ] ); ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
} }

View File

@ -239,7 +239,7 @@ jQuery.event = {
// remove generic event handler if no more handlers exist // remove generic event handler if no more handlers exist
if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { if ( eventType.length === 0 || pos != null && eventType.length === 1 ) {
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
removeEvent( elem, type, elemData.handle ); jQuery.removeEvent( elem, type, elemData.handle );
} }
ret = null; ret = null;
@ -527,7 +527,7 @@ jQuery.event = {
} }
}; };
var removeEvent = document.removeEventListener ? jQuery.removeEvent = document.removeEventListener ?
function( elem, type, handle ) { function( elem, type, handle ) {
if ( elem.removeEventListener ) { if ( elem.removeEventListener ) {
elem.removeEventListener( type, handle, false ); elem.removeEventListener( type, handle, false );

View File

@ -327,7 +327,7 @@ jQuery.fn.extend({
results = { fragment: parent }; results = { fragment: parent };
} else { } else {
results = buildFragment( args, this, scripts ); results = jQuery.buildFragment( args, this, scripts );
} }
fragment = results.fragment; fragment = results.fragment;
@ -392,7 +392,7 @@ function cloneCopyEvent(orig, ret) {
}); });
} }
function buildFragment( args, nodes, scripts ) { jQuery.buildFragment = function( args, nodes, scripts ) {
var fragment, cacheable, cacheresults, var fragment, cacheable, cacheresults,
doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document); doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
@ -422,7 +422,7 @@ function buildFragment( args, nodes, scripts ) {
} }
return { fragment: fragment, cacheable: cacheable }; return { fragment: fragment, cacheable: cacheable };
} };
jQuery.fragments = {}; jQuery.fragments = {};
@ -569,7 +569,7 @@ jQuery.extend({
jQuery.event.remove( elem, type ); jQuery.event.remove( elem, type );
} else { } else {
removeEvent( elem, type, data.handle ); jQuery.removeEvent( elem, type, data.handle );
} }
} }
} }

View File

@ -134,7 +134,7 @@
// release memory in IE // release memory in IE
root = script = div = all = a = null; root = script = div = all = a = null;
})(); })( jQuery );
jQuery.props = { jQuery.props = {
"for": "htmlFor", "for": "htmlFor",