[PATCH v2] web: Made elapsed time calculation dynamic (javascript).

Adrian Buehlmann adrian at cadifra.com
Wed Apr 27 13:47:58 CDT 2011


On 2011-04-27 19:54, Kevin Gessner wrote:
> 2011/4/27 Adrian Buehlmann <adrian at cadifra.com>:
>> On 2011-04-27 11:21, Benoît Allard wrote:
>>> About the flickering, you are right Adrian that it occurs. I doubt I can
>>> do something about it, patch are welcome to fix this. I've been pointed
>>> on IRC toward using a DOM-ready event instead of the `window.onload`.
>>> This would replace the text in an earlier stage, even before rendering.
>>> Unfortunately, there is no portable way to use it. There are solutions
>>> involving jQuery, or domready [1] (a subset of jQuery). I'd be delighted
>>> to see patches that involve one of these accepted.
>>
>> While I like the idea of calculating the ages on the client side, I fear
>> the flickering is pretty much a show stopper on this.
>>
>> So I think this flickering problem needs to be solved before this patch
>> should be taken.
> 
> Another way to solve the flickering is to call `process_dates` at the
> bottom of the page (below all the elements that have a date). At this
> point the necessary DOM elements will be available to JS, so you
> wouldn't need to wait for either dom-ready or window.load.

I offer to test that claim on Windows 7 with IE9, Google chrome and
Firefox 4 if Benoît provides a testpatch for this. It doesn't need to be
a fully polished patch yet.





More information about the Mercurial-devel mailing list