nathansmith/adapt — pull request #21 by raray (2012-10-11 21:25:13+00:00)
Title: Update Callback Behavior

I modified the way the callback is handled to prevent it from firing before the new stylesheet is loaded by attaching it to the link element via .onload. "i" and "width" were made "global" to accommodate this.

It might be desirable to include a check to see whether the browser supports .onload for link elements, but it seems sufficiently well supported so I didn't bother.