On Nov 18, 4:22 am, "Rémi Grumeau" <[email protected]> wrote:
> Could you test this url with your first gen iPhone 
> please?http://we-are-gurus.com/labs/orientation.html
>
> supported? not supported?

While that appears deliver correct results in Firefox and iOS on
iPhone 3, I think your test for onorientationchange is less than
optimal.

  if (typeof window.onorientationchange == "object")

window is a host object and is not required to follow many basic
ECMAScript rules, such as the result of a typeof test. This can be
observed in current browsers, where for certain tests IE will return
"unknown", which actually indicates support.

I think the test above is very much limited to Safari, as other
browsers implement onorientationchange I think you'll find they return
different strings for typeof tests. Further, Mozilla browsers return
"undefined" for any event handler that has not been assigned a value,
so:

  typeof window.onlaod

returns undefined if nothing has been assigned to that property,
assuming lack of support because of that result is a mistake.


--
Rob

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to