I am using XMLHttpRequest to call a REST service.
When testing is under Mozilla and Chrome everything works just fine.
Although, when I enabled the Ripple under Chrome it stopped working. After some debugging I found out that in the switch/case statement, where I do something like …
switch (this.readyState) {
case XMLHttpRequest.DONE: ... some code here ... break;
}
… the “case” does not get fired.
Closer examination determined that all the values XMLHttpRequest.* are undefined so that is the reason my code stopped working.
Q: Why XMLHttpRequest readyState values, otherwise well defined, become undefined under Ripple?
Are there any solutions for that issue, other than using plain numbers like 1, 2, 3, 4 or defining the values myself.
After installing the Ripple Emulator 0.9.5 the testing script passes the test – the XMLHttpRequest values for LOADING, DONE, etc. are there.
Looks like you have to download the Ripple from https://developer.blackberry.com/html5/downloads/ripple and then manually install the Chrome extension instead of just updating the extension from the menu.
NOTE: At the time this question was asked the version above was not available so the problem existed.
NOTE2: Here is a link https://developer.blackberry.com/html5/documentation/ww_getting_started/Use_the_Ripple_emulator_Chrome_extension_2007542_11.html with instructions how to install the extension to the Chrome, i.e. drag-and-drop the ripple_ui.crx file.