Closed Bug 35322 Opened 25 years ago Closed 25 years ago

RFE: want a navigator.cssEnabled boolean property

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

x86
Windows 98
enhancement

Tracking

()

VERIFIED DUPLICATE of bug 32372
Future

People

(Reporter: martin.honnen, Unassigned)

Details

(Keywords: helpwanted)

Both NN4 and mozilla have a preference to disable stylesheets. Though signed script can read preferences to check whether stylesheets are enabled or disabled there a often requests by script writers to give a(n unsigned) script a property to check. I suggest to introduce a property to the navigator object, it could be named navigator.cssEnabled for instance or navigator.styleSheetsEnabled Such a property is particular important for Mozilla/NN6 as you could get that info with a cheap trick in NN4 (insert a positioned ided test element and check whether document.elementID is defined) but this doesn't work with Mozilla/NN6.
CSS will always be enabled in Mozilla but it's certainly possible to disable the inline and linked style sheets in the content area. I'm not sure we want that feature, though. Reassigned to Rick.
Assignee: pierre → rickg
My inclination is to not do this, but I'd like the author to provide evidence to the contrary.
In both M15 and NN6PR1 if you go to Edit->Preferences->Advanced you can check/uncheck Enable style sheets Unchecking that preference doesn't seem to have an effect currently as styles in a html document are still applied. In NN4 there is a similar preference which when unchecked causes NN4 to ignore css (styles) in the html document. If Mozilla has that preference to do the same (i.e. ignore css) then it is helpful for script authors to know whether that preference is set or not. For example an animation code doesn't need to run if positioning is not possible at all.
I don't feel strongly, so I'm sending this to EricK to decide.
Assignee: rickg → ekrock
<tough_decision>It's a good idea, Martin. Unfortunately, it's a "nice to have" enhancement, and I'm required to be ruthlessly disciplined in pushing such things off to the future at this point. CSS is designed to degrade gracefully, so well designed content formatted with CSS should be readable whether or not CSS is enabled. Marking FUTURE and helpwanted. Keep the ideas coming!</tough_decision>
Keywords: helpwanted
Summary: RFE: navigator.cssEnabled property → RFE: want a navigator.cssEnabled boolean property
Target Milestone: --- → Future
Something to consider is that Nav4x implemented this pref because it had a very poor support of CSS. Mozilla is very close to a full standard compliance so there is a bit less interest in turning the stylesheets off.
Reassigning to nobody@mozilla.org.
Assignee: ekrock → nobody
*** This bug has been marked as a duplicate of 32372 ***
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
v. dupe
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.