Re: Compatibility problem with Safari

Posted by Chris Bailey-2 on
URL: https://discuss.orbeon.com/Compatibility-problem-with-Safari-tp33596p33598.html

Strange - I got the error message when viewing the Government Forms example.

While initially I thought it must be a problem with my browser it is clear
that hasOwnProperty is only defined in Safari 2.0.2 and above so it should
be producing an error in earlier browsers (as a quick look through your
code shows you don't seem to define hasOwnProperty yourselves).

<http://webkit.org/blog/32/webkit-fixes-in-safari-202-mac-os-x-1043/>

Chris.

--On 23 April 2007 12:20 -0700 Alessandro Vernet <[hidden email]> wrote:

> Hi Chris,
>
> Which example can I try to reproduce this problem? I tried the
> Government Forms and Controls examples, and both are working fine for
> me on Safari.
>
> Alex
>
> On 4/23/07, Chris Bailey <[hidden email]> wrote:
>> Hi Team,
>>
>> I recently tried to view my xforms app in Safari (1.3.2) and was
>> surprised to find that every xform interaction produces the following
>> error message:
>>
>> Error while processing response: Value undefined (result of expression
>> this._http_header.hasOwnProperty) is not object.
>>
>> This error also occurred when I viewed the www.orbeon.com demo pages as
>> well.
>>
>> A bit of Google searching found this page:
>> <http://phrogz.net/JS/hasOwnProperty.html> which indicates that "Safari
>> (up to and including version 2.0) does not support this method."
>>
>>
>> I found this workaround on a blog
>> <http://erik.eae.net/archives/2005/06/06/22.13.54>:
>> if( !Object.prototype.hasOwnProperty )
>> {
>>         Object.prototype.hasOwnProperty = function( property )
>>         {
>>                 try
>>                 {
>>                         var prototype = this.constructor.prototype;
>>                         while( prototype )
>>                         {
>>                                 if( prototype[ property ] == this[
>>                                 property ] ) {
>>                                         return false;
>>                                 }
>>                                 prototype = prototype.prototype;
>>                         }
>>                 } catch( e ) {}
>>                         return true;
>>                 }
>> }
>>
>> I also notice YAHOO.lang provides a hasOwnProperty function. Maybe you
>> can switch over to using this (or modify your supported browser
>> statement).
>>
>> Chris.
>> --
>> ----------------------
>> Chris Bailey
>> [hidden email]
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list. To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>


--
----------------------
Chris Bailey
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws