I like that it warns about *lack* of side effects. I mean, any
functional programmer would think that's a great warning to have :)
-foca
On Tue, May 17, 2011 at 3:24 PM, Rick Waldron waldron.r...@gmail.com wrote:
Andrew, Richard
Not sure if this helps, but I figured it was worth the mention...
The thing is that someone who knows Prototype knows that update
changes the innerHTML of an element. If another programmer sees your
code and sees you're updating an image, he'll be a little puzzled :)
If you use image.src = path, or image.setAttribute(src, path) or
image.writeAttribute(src,
On Jan 8, 2008 11:20 PM, Simon Thomas [EMAIL PROTECTED] wrote:
Can anyone explain the difference in the folllowing and when and why
to use each of the methods.
(Or knows a better place to ask this question)
1)
var myVar = function(args){
// inner functions and vars
};
This makes
, on any other JavaScript mailing list.
Thanks!
On Jan 9, 2008 2:36 AM, Nicolás Sanguinetti [EMAIL PROTECTED] wrote:
On Jan 8, 2008 11:20 PM, Simon Thomas [EMAIL PROTECTED] wrote:
Can anyone explain the difference in the folllowing and when and why
to use each of the methods
element.update(hello)
Element.update can take a string (in which case it's set as
innerHTML), an Element object, or any object that responds to either
toElement or toHTML (and which returns accordingly either an element
or a string of html :))
(The same goes for Element.replace and
If you need just sprintf functionality, there's a nice wrapper
around the Template class in String.interpolate
http://www.prototypejs.org/api/string/interpolate
Best,
-Nicolas
On Dec 30, 2007 1:08 PM, Severin Heiniger [EMAIL PROTECTED] wrote:
There's already the powerful Template [1]
I was trying to figure out the problem of a poster in the spinoffs
list
(http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/4ff06bf903aced80)
about Event.observe throwing errors with the element. I saw the code,
it was using Event.observe(unextended_node, ...), so I figured
For the Cookies you have Prototype.Tidbits on livepipe:
http://livepipe.net/projects/prototype_tidbits/
And I know someone had done Moo's Assets for Prototype, but can't find the link.
Best,
-Nicolas
On Nov 21, 2007 8:35 AM, Mislav Marohnić [EMAIL PROTECTED] wrote:
These are useful, but I don't
I'm not gonna say to you that if you have something complex calling
destructors isn't correct. I'm just gonna argue against it being in
core, as IMHO it's something that not really many people need, and,
since you have to call it manually, the best you can do is defining a
naming convention, not
On 9/22/07, Les [EMAIL PROTECTED] wrote:
The OpenLayers API 2.5 (a maping API in part based on Prototype)
supports multiple inheritance, so why not Prototype?
Mislav said:
Also, multiple inheritance isn't all that good. There is a reason Java and
C++ successors like Objective-C and C# chose
Quick question: why does Element.wrap return the wrapped element
instead of the wrapper?
I've yet to find somewhere where I use wrap that I don't do .wrap(...).up()
Is it just me?
-Nicolas
--~--~-~--~~~---~--~~
You received this message because you are
How does the core team feel about letting Element.addMethods accept,
other than a tagname, a specific node or an array of nodes and extend
only those?
For example, I want only certain rows of a table to have some methods
available, and would love to do something like
On 9/1/07, Thomas Fuchs [EMAIL PROTECTED] wrote:
IMHO, contentloaded should be fired once, when the DOM of the
initial page is completely loaded and parsed by the browser.
...
I think making contentloaded too magic breaks POLS.
Actually it works the other way around for me. My mind maps
Dan Webb's LowPro[1] solves this kind of issue by registering a
global Ajax.Responder that evaluates DOMContentReady behaviors
onComplete.
Thinking along similar lines, you could wrap Event.observe so that
observers set for contentloaded are also stored into a queue that gets
processed after
On 1.6.0 this has been aliased to select
$(my-element).select(a[href=foo])
-Nicolas
On 8/29/07, Jacob Rockowitz [EMAIL PROTECTED] wrote:
Hi,
I have been using Element#getElementsBySelector a lot and keep feeling
that the method's name is too verbose, couldn't it just be an Element#$
$.
+1 for optional function
-Nicolas
On 8/29/07, Tom Gregory [EMAIL PROTECTED] wrote:
I was thinking about this the other day as I was going through
Christophe's book ... I know I'm resurrecting an old thread, but stay
with me.
Instead of adding a maxFrequency option, (really, maxDelay),
I've been using http://pastie.caboo.se/91025 so when a user has errors
in the form, the focused element is the first erroneous field (and
when there are no errors, it behaves normally, focusing the first
element).
If the core team thinks it's useful I'll write a patch with proper tests :)
As soon as I get some free time from work, I'll rewrite a lot of
active support for js
(http://code.google.com/p/active-support-for-javascript), including
all necessary adjustments to work well with 1.6 (like removing the
interpolation methods, which are now useless :))
Best regards,
-Nicolas
On
18 matches
Mail list logo