#writeAttribute will fail when given bogus attribute/value. That's one
of the reasons why passing Element as an iterator doesn't work.

// Element receives 0,1, ..., n as a second attribute (and then tries
to apply those values via #writeAttribute)
$w(' div span h2 ').map(Element);

- kangax

On Jun 23, 8:36 am, Josi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> After one hour of debugging, I found out that Element.writeAttribute
> could throw an Exception "0x80530005
> (NS_ERROR_DOM_INVALID_CHARACTER_ERR)" on Line 1808
> element.setAttribute(name, value)
> I created an Element by using this:
>
> var elem = new Element('div',
> {'class':'myclass','id':'myid'}).update(thetext);
>
> if name is an object. I didn't find out why name is in my case an
> object, but after changing the code to
>
> 1807:    else if(typeof(name) == 'string'){
> 1808:         element.setAttribute(name, value)
> 1809:    };
>
> everything works fine again.
> Does somebody has similar problems?
>
> Josi
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to