Hi all,
Does anyone know if there is an intention to implement openAjax
support standard in the future?
Cheers,
Shy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, se
Hey Zmitro,
If the element has no parent (which means it is not part of the document
tree), how do you expect Element#remove() to work then? In my opinion, an
error is what *should* happen in this case:
var div = new Element()
div.remove()
Are you suggesting it should silently fail? I don't
Hi,
Not sure if this has come up before, but I was thinking that an option
for Ajax.Updater to allow for a 'replace' call instead of the current
'update' would be useful.
I find that I don't always want to update a given section of html, but
would rather replace it entirely.
Thoughts?
As an as
I understand what you're saying, however I'm more interested in making
the functionality of Prototype's update function worthwhile for all
the elements which are extended to use it. Like I said, currently
calling ".update" on an image does nothing. My point is "Why waste
it?".
When "updating" a
On Jan 26, 2008 8:12 AM, kangax <[EMAIL PROTECTED]> wrote:
>
> $('myImage').setSrc('images/blah.jpg');
Wow, Kangax! That method really takes the pain out of writing
$('myImage').src = 'images/blah.jpg';
--~--~-~--~~~---~--~~
You received this message because y
On Jan 26, 2008 3:00 AM, dynamo517 <[EMAIL PROTECTED]> wrote:
>
> I'm sure there will be more appreciative people than puzzled people if
> the functionality I propose makes it's way in.
Quite the contrary. I remember Sam saying that he dislikes functions that
have the same name, but do different
Well, of course, but I don't really see it as a problem.
When element.parentNode == null it means that element is either a top
level one (i.e. document) or has not yet been inserted into a DOM.
It makes no sense to call remove in either of these cases.
Am I missing something?
- kangax
--~--~---
Hi.
The remove function texts:
Element.Methods = {
...
remove: function(element) {
element = $(element);
element.parentNode.removeChild(element);
return element;
},
...
This code fails when element.parentNode == null
I use prototype v 1.6
--~--~-~--~~~--
basically, because number.round() is much shorter to type than
Math.round(number). :)
-Thomas
Am 18.01.2008 um 23:49 schrieb Tobie Langel:
>
>
>> Then the question is, why do it for the Math functions but not the
>> String functions?
>
> AFAIK, because the Math ones were needed for script.ac
As Nicolás pointed out, making Element.update change src attribute of
an image is NOT the way to go. Not only is it unintuitive but
redefining existent methods could lead to some serious bugs in future
maintenance/upgrades, etc. If you feel like Element.writeAttribute is
too verbose, I would sugge
If the Element doesn't have a parent node, then it's not in a context
that it can be "removed" from.
So, either leave it for garbage collection...or, just delete it...
var div = new Element();
delete div;
If needed, surround it in a simple test to make sure:
var div = new Element();
[..
Simple subclassing should do the job (haven't tested but it should
work):
Ajax.Replacer = Class.create(Ajax.Updater, {
initialize: function($super, container, url, options) {
options = options || { };
options.onComplete = (options.onComplete ||
Prototype.emptyFunction)
.wrap(funct
12 matches
Mail list logo