You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the following prototype 1.7.1 statement works as expected in Chrome and IE10, it fails to set the background color of titleDiv in Firefox 20: titleDiv.setStyle({ "background-color": titleBackgroundColor });
However, the following standard javascript statement works just fine in all 3 browsers: titleDiv.style.backgroundColor = titleBackgroundColor;
The text was updated successfully, but these errors were encountered:
According to the documentation you need to use the camelCase version of the style attribute, backgroundColor vs background-color. http://api.prototypejs.org/dom/Element/prototype/setStyle/
Chrome and IE10 are more forgiving on the style properties however Firefox is not.
Closing this for now. If other people end up reporting it, it might be worth guarding against this error somehow — either by attempting to convert to camelCase or by warning the user that hyphenated properties aren't going to work.
previous lighthouse ticket #3101
by Eric Friedman
Although the following prototype 1.7.1 statement works as expected in Chrome and IE10, it fails to set the background color of titleDiv in Firefox 20:
titleDiv.setStyle({ "background-color": titleBackgroundColor });
However, the following standard javascript statement works just fine in all 3 browsers:
titleDiv.style.backgroundColor = titleBackgroundColor;
The text was updated successfully, but these errors were encountered: