jquerytools/jquerytools — pull request #760 by sompylasar (2012-05-14 08:34:02+00:00)
Title: The placeholder HTML is assigned twice

(resubmitted to dev branch from pull request https://github.com/jquerytools/jquerytools/pull/752 )

Whether onFail is defined or not, the default placeholder for the Flash content is assigned. Then, onFail is executed to get new content and re-assign it.

This double DOM change that may cause a reflow was noticed to be slow on some mobile devices, so the default placeholder appears for a moment, and then, after onFail that returns an empty string, disappears as intended.

In the commit I've reordered the placeholder HTML assignment to prevent double DOM change via innerHTML.