opitzconsulting / jquery-mobile-angular-adapter

jquery mobile angular adapter
MIT License
517 stars 114 forks source link

'document.addEventListener' does not work with IE < 9 #61

Closed shyblower closed 12 years ago

shyblower commented 12 years ago

You could use a crossbrowser wrapper like this one http://javascript.nwbox.com/ContentLoaded/contentloaded.js to substitute for 'document.addEventListener("DOMContentLoaded", callOnce, false);' I've already tested it using this wrapper and found it working flawlessly.

tbosch commented 12 years ago

Hi, well, IE8 ist only needed for Windows Phone 7 before Windows Phone Mango, and as far as I know every Windows Phone 7 device can be updated to Windows Phone Mango. Then we can rely on IE9, which makes everything more easy!

What is your usecase? Are you using a Windows Phone prior to Windows Phone Mango?

Tobias

shyblower commented 12 years ago

I use jquery.mobile also for desktop browsers in some of my projects to maintain a consistent UI experience, especially in webapps that should also be touchscreen friendly. My clients appreciate not having to learn the handling of different user interfaces for the same app on different devices. This concept works out quite well when "non powerusers" have to use your app on desktops and mobiles and don't want to spend time in learning it because most of them find it easier to handle that iPhone like simple GUIs and many of them are already familiar with some type of smartphone or tablet. But since some of my clients are from large companies where they still use browsers down to IE7 (and some still IE6.. eeeeek) I need to make my stuff compatible with their archaic equipment. Now, since the remaining parts of your adapter (actually I haven't tested all of it yet) seem to work at least with IE8 and this adaption would only be a minor one since there would only be 2 lines needed to be replaced and there are already copy&paste solutions available I thought it would be feasible and useful to integrate this into the original source.

Tom

tbosch commented 12 years ago

Hi, good point. Well,maybe the best solution would be to use $.bind at those locations in the adapter you mentioned. Then it should also work on Ie8 and I don't have to create a special case for Ie8 in the code.

I will be on holiday until october 1st, so if you need this patch earlier, you could create a pull request..

Thanks, Tobias