Ok I am hoping someone can give me some advice on two hacks I put into
prototype to avoid some issues with our Prototype/Scriptapulous/GWT
stack on MAC+Safari.  What we do is prepare a page with prototype and
then we run some GWT code that injects GWT elements where required.
These elements (I assume using createElement under the covers) were
not being created with prototype DOM extensions on Safari.  Moreover,
sometimes when you used GWT controls they would modify things like the
form and it would lose its prototype methods, etc.

Some folks over in GWT land had put in a hack when doing this type of
thing with Prototype 1.5 where they would explicitly set the
_nativeExtensions to false appeared to force Prototype to always apply
the element methods on each create.  The problem (of course) was that
I was trying to use Prototype which no longer had this
variable ...

Basically what I did was the following:

@ line 41
if (Prototype.Browser.WebKit)
  Prototype.BrowserFeatures.SpecificElementExtensions = false;

impact @ line 2559
- since SpecificElementExtensions is set to false for WebKit browsers,
Element.extend will never return Prototype.K -- it will always attempt
to extend the incoming element (at least that is how I read it).  :)

@ line 2285
//      if (!Prototype.BrowserFeatures.ElementExtensions) {
            Object.extend(Methods, Element.Methods);
            Object.extend(Methods, Element.Methods.Simulated);
//              }

This is part of the extend refresh, and what we do (even though this
says it is not required for Safari) is that we go ahead and extend the
object anyway.

What I am hoping for is anyone that can give me a clue as to the true
impact of these changes.  We were using Safari 3.2.1 on the Mac when
we experienced these issues.  In general what would happen is that the
Form would no longer have its serialize or its insert functions.  The
first change allowed us to force the serialize and the second part
allowed us to set the functions as part of refresh which gave us the
insert function.

I did a surface test on MAC+Safari and MAC+Firefox as well as Vista
+Firefox,IE8,Safari, and Chrome.  All seemed to work (IE8 has one
issue) with these changes, but I was worried I might be doubling up
some of the extension logic which may produce undesired effects OR may
cause a performance hit.

Any thoughts?

You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to