Revisions
-
island205 revised this gist
Dec 5, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ We have some subset of `$.ajax` short cuts which are uneven. These should be rem What does it even do? It doesn't just set / get attributes. It does a whole bunch of weird logic for backwards compat. # `:text` `:button` `:checkbox` Useless, slow utility selectors. Having these things promotes bad and slow code. You wouldn't want to use them for performance penalities. They also make the CSS selector a joke by throwing propitiatory selectors in the mix. -
Raynos revised this gist
Dec 5, 2011 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,4 +48,8 @@ domManip executes all scripts irregardless of their status. It does not bother t > The first is a flag indicating whether or not the script block has been "already started". Initially, script elements must have this flag unset (script blocks, when created, are not "already started"). The cloning steps for script elements must set the "already started" flag on the copy if it is set on the element being cloned. # `.bind` `Function.prototype.bind` exists. Pick a better name [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#insert-an-element-into-a-document -
Raynos revised this gist
Dec 5, 2011 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,4 +40,12 @@ These shouldn't exist. # `.each`, `.map`, etc Doesn't match the `.forEach`, `.map`, etc signature. Massively confusing # `.domManip` domManip executes all scripts irregardless of their status. It does not bother to check whether they are [inserted into a document][1] nor does it bother to check whether their "already started" flag is set. > The first is a flag indicating whether or not the script block has been "already started". Initially, script elements must have this flag unset (script blocks, when created, are not "already started"). The cloning steps for script elements must set the "already started" flag on the copy if it is set on the element being cloned. [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#insert-an-element-into-a-document -
Raynos created this gist
Dec 1, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ # jQuery `$` itself is a god object. Everything goes on it. The standard plugin / extension architecture that is recommended is to just bolt more methods on `$` itself! Surely this is bad. An example would be how we have both `$.load` which is overloaded to do completely different things. If they were on two separate sensibly named objects `$Container.load` and `$EventTarget.load`. Personally I would deprecate the latter in favour of `.on('load'` The animation should be it's own little modular thing, not bolted onto `$`. Ajax should be it's own little modular thing, not bolted onto `$` # `$` This is overloaded to three functions. It would be more sensible to have `select`, `construct` and `domready` as there seperate entities. # `$.get`, `$.getJSON`, etc We have some subset of `$.ajax` short cuts which are uneven. These should be removed. # `$.attr` What does it even do? It doesn't just set / get attributes. It does a whole bunch of weird logic for backwards compat. # `:checked` `:button` Useless, slow utility selectors. Having these things promotes bad and slow code. You wouldn't want to use them for performance penalities. They also make the CSS selector a joke by throwing propitiatory selectors in the mix. At least split the selector engine into two, one that adheres to (a subset of) standards and one which have their own extensions. # `.css` css isn't bad as such. But it's overused, a lot. We do need a cross browser style manipulation utility but we don't need documentation recommending you use it everywhere. The community seems to _forget_ the massive penalty that is causing re flows. editing in-line css is slow and should be avoided # `.toggle` Another overloaded method that shouldn't be overloaded, that's just plain confusing # `.wrap`, `.live` These shouldn't exist. # `.each`, `.map`, etc Doesn't match the `.forEach`, `.map`, etc signature. Massively confusing