473,412 Members | 3,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Retrieving Unknown CSS Rules

For retrieving CSS rules that can not be interpreted by an layout
engine I can use the UnknownRule interface of DOM. Unfortunately in
Gecko (Firefox 1.0.5), I cannot access such rules using
document.styleSheets[0].cssRules because only "known rules" are
referenced. Is there another way to get the UnkownRule(s) in Gecko?

I tried KHTML (Konqueror 3.4), which references all CSS rules including
UnknownRules. Unfortunately, I cannot get the text of the rules. While
Gecko implements cssTextdocument.styleSheets[0].cssRules[0].cssText,
Konqueror does not. Is there a way to access the text of the rule in
KHTML?

Thanks,
Christoph

Aug 23 '05 #1
5 1716
In KHTML it is document.styleSheets[0].cssRules[0].style.cssText

Aug 23 '05 #2

Christoph wrote:
In KHTML it is document.styleSheets[0].cssRules[0].style.cssText


cssText is supposed to be "The parsable textual representation of the
rule". What kind of rule do you have exactly that you want to access
using the DOM? If Mozilla can't parse your rule it will hardly give you
any "parsable textual representation".

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 23 '05 #3

Martin Honnen wrote:
Christoph wrote:
In KHTML it is document.styleSheets[0].cssRules[0].style.cssText


cssText is supposed to be "The parsable textual representation of the
rule". What kind of rule do you have exactly that you want to access
using the DOM? If Mozilla can't parse your rule it will hardly give you
any "parsable textual representation".

--

Okay well the 'parsable textual representation of the rule' thing is
pretty irritating. In practice it seems to mean that the browser knows
best what you want to do with your application. Another example of this
browser nannyism would be returning RGB(0,0,255) for style.color when
color:blue.

According to the CSS spec implementors should ignore not understood
properties.
I believe the W3 dropped UnknownRule

http://lists.w3.org/Archives/Public/...3Oct/0347.html
Which just gives me that "W3 sucks" feeling.

Aug 26 '05 #4
Thanks, according to http://www.quirksmode.org/dom/w3c_css.html it
depends on the browser. (My rule is parsable)

Aug 29 '05 #5
Since I want to test conceived extensions to CSS in practice, I love
the UnknownRule interface.

Aug 29 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: pulu | last post by:
Hi, In the datawarehouse DB (under MS commerce server 2002) a table stores the referer domain name. Table structure is like refererdomainid <binary>,domainInternalFlag...
3
by: Marcus | last post by:
I'm running into a situation that has me adding a value of "Unknown" to a reference table. I am being pulled between two trains of thought, and was curious to get other's input on in. I give an...
2
by: Rob Cowie | last post by:
Hi, Given a string representing the path to a file, what is the best way to get at the filename? Does the OS module provide a function to parse the path? or is it acceptable to split the string...
0
by: Jason | last post by:
I am working on an ASP.Net application that retrieves various information about groups and users from AD and then I would like to look at the security information on some folder, on our server. I...
4
by: John Dann | last post by:
Is there any method in the File, Directory, FileInfo, Path etc classes that makes it easy to retrieve the folder name of the immediate parent folder of a file? I can't see one, but maybe I've...
11
by: jarod1701 | last post by:
Hi, i'm currently trying to replace an unknown string using regular expressions. For example I have: user_pref("network.proxy.http", "server1") What do I have to do to replace the...
2
by: deep2389 | last post by:
Hi, I have a sample ASP code which should get the records from a table in ACCESS database. However, while running the page I am getting the following error: "Microsoft OLE DB Provider for...
7
by: Larry Bud | last post by:
I have a simple data object that returns two columns in a dataset, ID and DESC, for example. When I bind a dropdownlist to this <dataobjectmethod>, I have to manually enter the column names for...
23
by: Himanshu Chauhan | last post by:
Hi! I was wondering, In the first parse of a singly linked list of unknown length, is it possible to know when we are at middle of the linked list? Regards --Himanshu
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.