Miniature sizzle

I can not find minified sizzle = (And if I try to do it myself using yuicompressor, after that some functions do not work. Please help.

+4
source share
4 answers

Get the latest uncompressed version here and compress it using any of these free tools:

The above all are inserted / get the result, not console applications, so getting results pretty quickly. The reason the mini version is not supported is because it is not a standalone library, but rather integrated into any of its use ... therefore, the processes of building / minimizing the entire library, for example. jQuery or Prototype 2.0 will include the use of Sizzle.

+7
source

Try using the minifier in http://fmarcia.info/jsmin/test.html to minimize it yourself.

0
source

The sizzle website claims to be "only 4KB miniature and gzipped." Most web servers serve gzipped content (transparently).

So, I think, if you minimize it, then your web server will serve it gzipped, then the transfer will be only 4K. You can probably verify this with a packet capture tool (like wirehark). I don't think there is a way to include a gzipped script in your HTML sources, this should be done at the server level.

0
source

The main function of Sizzle can be replicated as such:

function Sizzle(query){return document.querySelectorAll(query)} 

Done. No need for a library.

0
source

Source: https://habr.com/ru/post/1310110/


All Articles