John Resig - Talk: The DOM is a Mess
http://ejohn.org/blog/the-dom-is-a-mess/
I gave a talk last week at Yahoo (at the request of the YUI team) all about the DOM. I outlined some of the reasons why the current situation is such a mess, outline some strategies for working around it, and then give some examples of real world code that's being implemented in libraries today.JavaScript and the DOM Series: Lesson 1 - NETTUTS
JavaScriptのリファレンス。HTMLとCSSもある。見やすいけど少し重い。
Javascript reference
JavascriptJohn Resig: "The DOM Is a Mess" on Yahoo! Video
John Resig: "The DOM Is a Mess"Javascript and the DOM: Lesson 2 - NETTUTS
Going forward the performance community needs to partner more with browser vendors in addition to our more typical black box experiments. Browser makers know what is costly or irrelevant in terms of performance. Opera lists repaint and reflow as one of the three main contributors to sluggish JavaScript, so it definitely seems worth a look.
What causes reflows and repaints. These days usually not a big deal on websites targeted at regular PCs, but could be applicable to mobile devices.
"A repaint occurs when changes are made to an elements skin that changes visibility, but do not affect its layout. Examples of this include outline, visibility, or background color. According to Opera, repaint is expensive because the browser must verify the visibility of all other nodes in the DOM tree. A reflow is even more critical to performance because it involves changes that affect the layout of a portion of the page (or the whole page). Reflow of an element causes the subsequent reflow of all child and ancestor elements as well as any elements following it in the DOM."23 Indispensible Ajax and Javascript Cheat Sheets | Design Reviver
Design ReviverStephen Oney @ Carnegie Mellon
FireCrystal is a Firefox extension that helps designers and programmers alike figure out how interactive behaviors on the web work. FireCrystal allows users to "rewind" their interactions with web pages while showing the relevant code.
track DOM changes
@igrigorik: "nifty FF extension for replaying / rewinding DOM changes: http://bit.ly/2aGyPH" (from http://twitter.com/igrigorik/status/3839646962)hafriedlander's jquery.concrete at master - GitHub
Binds functions to DOM elements.
Concrete tries to provide a new model of code organisation – a replacement for Object Oriented programming that is focused on adding functions to groups of DOM elements based on the structure and contents of those DOM elements. It’s a merging of the model and view layer that initially seems weird, but can give very powerful results. We’re standing on the shoulders of giants here – combining ideas from Prototype’s behaviour & lowpro and jQuery’s effen & livequery (who themselves stole ideals from Self’s Morphic UI and others), but extending & combining the concepts presented in those tools to provide a complete alternative to traditional OO concepts – self-aware methods, inheritance, polymorphisim and namespacing without a single class definition.
Concrete – Support for ConcreteUI programming in jQuery
Concrete tries to provide a new model of code organisation – a replacement for Object Oriented programming that is focused on adding functions to groups of DOM elements based on the structure and contents of those DOM elements. It’s a merging of the model and view layer that initially seems weird, but can give very powerful results.Working with Events, Part 3: More Event Delegation with jQuery » Learning jQuery - Tips, Techniques, Tutorials
コレ使った。IEうぜー。img.onload = ""; や img = void 0; は IE で発生するメモリリークを回避するためのコードです。
naturalWidth
latest log
获得图片的真实尺寸Rolling out Sly - The JavaScript Selector Engine » digitarald:Harald K – Internet Consultant & Contractor
Finally getting round to taking a look at Sly. Well, not much to it. It's light, it's fast and very easy to use.DOMLint - Test suite against HTML/DOM conflicts
If you need to parse HTML, regular expressions aren’t the way to go. In this tutorial, you’ll learn how to use an open source, easily learned parser, to read, modify, and spit back out HTML from external sources. Using nettuts as an example, you’ll learn how to get a list of all the articles published on the site and display them.