[Proto-Scripty] Re: Ajax.Updater output garbled only on iPhone first load

2012-04-05 Thread Victor



  This turned out to be a page loading/timing issue. The original poster 
 resolved it by switching from document.observe('dom:loaded… to 
 Event.observe(window,'load'…

 Does dom:loaded
 not trigger correctly on the iPhone or something?


It sounds possible. Prototype now has 4 ways to detect that DOM is loaded:

   1. 'DOMContentLoaded' event on document - for all browsers with standard 
   document.addEventListener() method
   2. 'onreadystatechange' event on document - for the rest, 
   standards-incompatible, without document.addEventListener() (IE8-)
   3. document.documentElement.doScroll('left') - the same browsers as 
   previous
   4. 'load' event on window - universal fallback

Some other implementations (e.g. Ext 
Corehttp://docs.sencha.com/core/source/EventManager.html- see initDocReady()) 
are explicitly checking document.readyStatein WebKit-family.

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/prototype-scriptaculous/-/mBPou4iOu8UJ.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] qUnit equivalent for Prototype?

2012-04-05 Thread Walter Lee Davis
I am just getting started with JavaScript testing, can anyone recommend a 
(hopefully) drop-in replacement for qUnit in the Prototype world? I'm porting a 
jQuery sound player to Prototype, and I'd like to actually do TDD on it if 
possible.

Thanks in advance,

Walter

-- 
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.