The issue is that you can pass content (strings) to the headers or existing
table header elements, like so:
myTable.setHeaders(new Element('th', {...}));
To determine if you're passing an element, we pass the value through
document.id, which is throwing this warning. I'll add a check for empty
strings.
On Fri, Jan 1, 2010 at 12:32 PM, mmjaeger <[email protected]> wrote:
> actually passing null works in Firefox but not in Safari - this works
> in both browsers: tbl.setHeaders(['<!-- Number -->','Zeit','Titel']);
>
> On Jan 1, 12:27 pm, mmjaeger <[email protected]> wrote:
> > Hello
> > I guess, another one for Aaron and Happy New Year by the way
> >
> > var tbl = new HtmlTable({
> > properties: {
> > border: 0,
> > cellspacing: 0
> > },
> > zebra: true
> > });
> >
> > tbl.setHeaders(['','Header 1','Header 2']);
> >
> > passing an empty string to setHeaders causes an exclamation mark in
> > console log with the following message: Empty string passed to
> > getElementById(). - code still works though - Safari console doesn't
> > report anything.
> >
> > passing something like this: tbl.setHeaders([null,'header 1','header
> > 2']); works just fine.
>