diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-07-29 21:14:46 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-07-29 21:19:21 +0200 |
commit | 47835965bd100a3661d8299d8b769ceeb8b6ce48 (patch) | |
tree | 5ef322bc48cd27d5a5f004e6e3fcf955c67fc9eb /src/manipulation.js | |
parent | 79b74e043a4ee737d44a95094ff1184e40bd5b16 (diff) | |
download | jquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.tar.gz jquery-47835965bd100a3661d8299d8b769ceeb8b6ce48.zip |
Selector: Inline Sizzle into the selector module
This commit removes Sizzle from jQuery, inlining its code & removing obsolete
workarounds where applicable.
The selector-native module has been removed. Further work on the selector
module may decrease the size enough that it will no longer be necessary. If
it turns out it's still useful, we'll reinstate it but the code will look
different anyway as we'll want to share as much code as possible with
the existing selector module.
The Sizzle AUTHORS.txt file has been merged with the jQuery one - people are
sorted by their first contributions to either of the two repositories.
The commit reduces the gzipped jQuery size by 1460 bytes compared to master.
Closes gh-4395
Diffstat (limited to 'src/manipulation.js')
-rw-r--r-- | src/manipulation.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 4d20ec8d6..fc4c659fd 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -30,13 +30,9 @@ define( [ var - /* eslint-disable max-len */ - // See https://github.com/eslint/eslint/issues/3229 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - /* eslint-enable */ - // Support: IE <=10 - 11+, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ @@ -223,7 +219,8 @@ jQuery.extend( { if ( isIE && ( elem.nodeType === 1 || elem.nodeType === 11 ) && !jQuery.isXMLDoc( elem ) ) { - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + // We eschew jQuery#find here for performance reasons: + // https://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); |