Well, in the catch it's looking for a tbody or tr, so I'm guessing that
trying to insertAdjacentHTML to a tbody or tr fails in IE and Opera.
Maybe it's only certain versions.

Greg

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:rails-spinoffs-
> [EMAIL PROTECTED] On Behalf Of Peter Michaux
> Sent: Friday, July 21, 2006 8:54 AM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: [Rails-spinoffs] Abstract insertion question
> 
> Hi,
> 
> In the following block of Prototype.js when will the catch() block
> run? I cannot create conditions in Opera where it will run.
> 
> Thanks,
> Peter
> 
>   if (this.element.insertAdjacentHTML) {
>     /* IE and Opera */
>     try {
>       this.element.insertAdjacentHTML(this.adjacency, this.content);
>     } catch (e) {
>       // when will this run? can feature detection be used instead?
>       var tagName = this.element.tagName.toLowerCase();
>       if (tagName === 'tbody' || tagName === 'tr') {
>         this.insertContent(this.contentFromAnonymousTable());
>       } else {
>         throw e;
>       }
>     }
>   }
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to