@@ -268,24 +268,6 @@ function extensionMap(angular, name, transform) {
268
268
} ) ;
269
269
}
270
270
271
- function jqLiteWrap ( element ) {
272
- // for some reasons the parentNode of an orphan looks like _null but its typeof is object.
273
- if ( element ) {
274
- if ( isString ( element ) ) {
275
- var div = document . createElement ( 'div' ) ;
276
- // Read about the NoScope elements here:
277
- // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
278
- div . innerHTML = '<div> </div>' + element ; // IE insanity to make NoScope elements work!
279
- div . removeChild ( div . firstChild ) ; // remove the superfluous div
280
- element = new JQLite ( div . childNodes ) ;
281
- } else if ( ! ( element instanceof JQLite ) ) {
282
- element = new JQLite ( element ) ;
283
- }
284
- }
285
- return element ;
286
- }
287
-
288
-
289
271
/**
290
272
* @workInProgress
291
273
* @ngdoc function
@@ -422,7 +404,9 @@ function isBoolean(value) { return typeof value == $boolean;}
422
404
function isTextNode ( node ) { return nodeName_ ( node ) == '#text' ; }
423
405
function trim ( value ) { return isString ( value ) ? value . replace ( / ^ \s * / , '' ) . replace ( / \s * $ / , '' ) : value ; }
424
406
function isElement ( node ) {
425
- return node && ( node . nodeName || node instanceof JQLite || ( jQuery && node instanceof jQuery ) ) ;
407
+ return node &&
408
+ ( node . nodeName // we are a direct element
409
+ || ( node . bind && node . find ) ) ; // we have a bind and find method part of jQuery API
426
410
}
427
411
428
412
/**
@@ -1057,11 +1041,11 @@ function bindJQuery(){
1057
1041
// bind to jQuery if present;
1058
1042
jQuery = window . jQuery ;
1059
1043
// reset to jQuery or default to us.
1060
- if ( window . jQuery ) {
1061
- jqLite = window . jQuery ;
1062
- extend ( jqLite . fn , {
1063
- scope : JQLite . prototype . scope ,
1064
- cloneNode : cloneNode
1044
+ if ( jQuery ) {
1045
+ jqLite = jQuery ;
1046
+ extend ( jQuery . fn , {
1047
+ scope : JQLitePrototype . scope ,
1048
+ cloneNode : JQLitePrototype . cloneNode
1065
1049
} ) ;
1066
1050
} else {
1067
1051
jqLite = jqLiteWrap ;
0 commit comments