CSSRule.cssText has no value

RESOLVED WORKSFORME

Status

()

P3
normal
RESOLVED WORKSFORME
18 years ago
18 years ago

People

(Reporter: david, Assigned: jst)

Tracking

({dom2})

Trunk
Future
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: (py8ieh: verify))

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
The cssText property of CSSStyleDeclaration has no value, as demonstrated
by the code below.

Note that the CSSStyleDeclaration object identifies itself as
a CSS2Properties object, but it is supposed to implement both interfaces...

<head>
<style>
P { color: red }
</style>
</head>
<body>
<script>
var rule = document.styleSheets[0].cssRules[0];
// Bug: this should display "P { color: red }"
document.write("<p>rule.cssText: " + rule.cssText);

// Bug: this should display "P"
document.write("<p>rule.selectorText: " + rule.selectorText);

// Bug: this should return "color: red"
document.write("<p>rule.style.cssText: " + rule.style.cssText);

// Bug: this should work like calling item()
document.write("<p>rule.style[0]: " + rule.style[0]);

document.write("<p>rule.style.item(0): " + rule.style.item(0));
</script>
</body>
(Reporter)

Comment 1

18 years ago
Sorry; I was off by one on the component.  Reassigning.

See also bug #61607, bug #62611, bug #62613
Assignee: akkana → jst
Component: DOM to Text Conversion → DOM Level 2
Keywords: correctness
(Reporter)

Comment 2

18 years ago
Created attachment 20534 [details]
testcase
(Assignee)

Comment 3

18 years ago
This bug has been marked "future" because the original netscape engineer
workingon this is over-burdened. If you feel this is an error, that you or
another known resource will be working on this bug,or if it blocks your work in
some way -- please attach your concern to the bug for reconsideration.
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Future
Keywords: dom2
Component: DOM Level 2 → DOM Style
Taking QA Contact on all open or unverified DOM Style bugs...
QA Contact: sujay → ian
This is CSSRule.cssText, not CSSStyleDeclaration.cssText, which you can get
by saying 

   rule.style.cssText

...and which does seem to work in my testing.
Summary: CSSStyleDeclaration.cssText has no value → CSSRule.cssText has no value

Comment 6

18 years ago
According to W3C http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-
20001113/css.html#CSS-CSSStyleDeclaration there should be a cssText property 
for CSSStyleDelcaration
Nominating this bug for nsbeta1 on behalf of gerardok@netscape.com.
Keywords: nsbeta1
Removing nsbeta1 nomination -- there was a misunderstanding and some "approved
out features" were nominated by mistake! Sorry!
Keywords: nsbeta1

Comment 9

18 years ago
WORKSFORME on Linux build 2001052621.... 

(unless I misinterpreted the testcase)

please verify
(Assignee)

Comment 10

18 years ago
Worksforme.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → WORKSFORME
Whiteboard: (py8ieh: verify)
You need to log in before you can comment on or make changes to this bug.