Discussion:
[Proto-Scripty] Change $ to $p or $proto in prototype.js
Amit Dwivedi
2015-10-22 05:58:50 UTC
Permalink
Hi,
Can we change $ in prototype.js to something else like $p or $proto

Thanks
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Walter Lee Davis
2015-10-22 21:57:14 UTC
Permalink
The framework doesn't provide any tools to enable that, but you could fork it and do that I suppose. You may have a larger issue because Prototype extends the prototype (small p) of a lot of different parts of the JavaScript language, and some of these changes mean that sloppily-written code will error out rather than sorta work. Iterating over an object with for .. in will also iterate over all of the methods that Prototype adds to every object, for example. This is fine if you have a normal object, but an Array is also an object, and it gets a bunch of new methods added to it as well. This breaks assumptions that code written in the absence of Prototype may be relying on to work at all.

Walter
Post by Amit Dwivedi
Hi,
Can we change $ in prototype.js to something else like $p or $proto
Thanks
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Phil.petree
2015-10-22 22:10:22 UTC
Permalink
The real question is, which problem are you trying to solve? Some sort of conflict?

Sent from my iPhone
Post by Walter Lee Davis
The framework doesn't provide any tools to enable that, but you could fork it and do that I suppose. You may have a larger issue because Prototype extends the prototype (small p) of a lot of different parts of the JavaScript language, and some of these changes mean that sloppily-written code will error out rather than sorta work. Iterating over an object with for .. in will also iterate over all of the methods that Prototype adds to every object, for example. This is fine if you have a normal object, but an Array is also an object, and it gets a bunch of new methods added to it as well. This breaks assumptions that code written in the absence of Prototype may be relying on to work at all.
Walter
Post by Amit Dwivedi
Hi,
Can we change $ in prototype.js to something else like $p or $proto
Thanks
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Amit Dwivedi
2015-10-29 07:18:43 UTC
Permalink
Yeah pete, i was getting conflict while i was using jquery and prototype.js
together.
Post by Phil.petree
The real question is, which problem are you trying to solve? Some sort of conflict?
Sent from my iPhone
Post by Walter Lee Davis
The framework doesn't provide any tools to enable that, but you could
fork it and do that I suppose. You may have a larger issue because
Prototype extends the prototype (small p) of a lot of different parts of
the JavaScript language, and some of these changes mean that
sloppily-written code will error out rather than sorta work. Iterating over
an object with for .. in will also iterate over all of the methods that
Prototype adds to every object, for example. This is fine if you have a
normal object, but an Array is also an object, and it gets a bunch of new
methods added to it as well. This breaks assumptions that code written in
the absence of Prototype may be relying on to work at all.
Post by Walter Lee Davis
Walter
Post by Amit Dwivedi
Hi,
Can we change $ in prototype.js to something else like $p or $proto
Thanks
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
Post by Walter Lee Davis
Post by Amit Dwivedi
To unsubscribe from this group and stop receiving emails from it, send
<javascript:>.
<javascript:>.
Post by Walter Lee Davis
Post by Amit Dwivedi
Visit this group at
http://groups.google.com/group/prototype-scriptaculous.
Post by Walter Lee Davis
Post by Amit Dwivedi
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
Post by Walter Lee Davis
To unsubscribe from this group and stop receiving emails from it, send
<javascript:>.
<javascript:>.
Post by Walter Lee Davis
Visit this group at
http://groups.google.com/group/prototype-scriptaculous.
Post by Walter Lee Davis
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Phil.petree
2015-10-29 11:55:45 UTC
Permalink
I suspected that's what it was and was gonna suggest jquery.noconflict

Sent from my iPhone
Yeah pete, i was getting conflict while i was using jquery and prototype.js together.
Post by Phil.petree
The real question is, which problem are you trying to solve? Some sort of conflict?
Sent from my iPhone
Post by Walter Lee Davis
The framework doesn't provide any tools to enable that, but you could fork it and do that I suppose. You may have a larger issue because Prototype extends the prototype (small p) of a lot of different parts of the JavaScript language, and some of these changes mean that sloppily-written code will error out rather than sorta work. Iterating over an object with for .. in will also iterate over all of the methods that Prototype adds to every object, for example. This is fine if you have a normal object, but an Array is also an object, and it gets a bunch of new methods added to it as well. This breaks assumptions that code written in the absence of Prototype may be relying on to work at all.
Walter
Post by Amit Dwivedi
Hi,
Can we change $ in prototype.js to something else like $p or $proto
Thanks
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Amit Dwivedi
2015-10-29 07:16:55 UTC
Permalink
Thanks for the reply Walter, changing $ to $p causing some problem(like
calling jquery hide or show function, prototype.js function gets called).
So i what did to solve the conflict is to open a prototype.js related
things in new tab and using jquery.noConflict().

Thanks,
Amit
Post by Walter Lee Davis
The framework doesn't provide any tools to enable that, but you could fork
it and do that I suppose. You may have a larger issue because Prototype
extends the prototype (small p) of a lot of different parts of the
JavaScript language, and some of these changes mean that sloppily-written
code will error out rather than sorta work. Iterating over an object with
for .. in will also iterate over all of the methods that Prototype adds to
every object, for example. This is fine if you have a normal object, but an
Array is also an object, and it gets a bunch of new methods added to it as
well. This breaks assumptions that code written in the absence of Prototype
may be relying on to work at all.
Walter
Post by Amit Dwivedi
Hi,
Can we change $ in prototype.js to something else like $p or $proto
Thanks
--
You received this message because you are subscribed to the Google
Groups "Prototype & script.aculo.us" group.
Post by Amit Dwivedi
To unsubscribe from this group and stop receiving emails from it, send
<javascript:>.
<javascript:>.
Post by Amit Dwivedi
Visit this group at
http://groups.google.com/group/prototype-scriptaculous.
Post by Amit Dwivedi
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+***@googlegroups.com.
To post to this group, send email to prototype-***@googlegroups.com.
Visit this group at http://groups.google.com/group/prototype-scriptaculous.
For more options, visit https://groups.google.com/d/optout.
Loading...