#319 ✓resolved
pmontrasio

Google Chrome: Uncaught TypeError: Object [object HTMLLIElement] has no method 'setStyle'

Reported by pmontrasio | September 3rd, 2008 @ 11:55 AM | in 1.7

The code in the attached test case fails when run by Google Chrome. It works fine in FF3 and IE6. The JS code is simple and it should hide a

element:

Element.observe(window, 'load', init);

function init(event) { $("err").setStyle({ display: 'none' }); }

The error message is

Uncaught TypeError: Object [object HTMLLIElement] has no method 'setStyle'

I tested it using prototype 1.6.0.2 and the error is at line 598. I also tested it with prototype 1.5.1.2 and the error is at line 453.

Note that both

document.getElementById('err').innerHTML = "ok";

and

$("err").innerHTML = "ok";

work fine from within the init function.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

Attachments

Referenced by

Pages