Version: (using KDE 4.3.2) OS: Linux Installed from: Unspecified Linux This script works correctly in Opera, Firefox, and IE... var dom_properties=new Array(); for (var a in document.getElementById('element_id').style) {dom_properties.push(a);} dom_properties.sort(); alert(dom_properties);
I should add this bug also occurs in WebKit as well. It's very important that this bug gets fixed for Konqueror because the documentation is unfortunately lacking so it barrels down to manually guessing is an object is supported or not. By fixing this bug a list of existing DOM properties can be generated and then folks like myself can take advantage of what Konqueror has to offer.
So you want it to return the list of all CSS dynamic properties, not the bound ones you can get via standard .length and .item methods?
Just run the script in Firefox, IE, or Opera; they return all the DOM properties that exist. This is massively useful as it makes discovering what is available much easier and removes the need for having to sit around waiting for someone to document everything. When you say 'dynamic properties' I'm not exactly following you...I'll take a best guess...are the properties that *are* currently being returned the ones that have a set "current" value while the ones that are not have no "set" values for the object in question? In example I was able to determine what new properties are supported in Opera 10.5: OTabSize, OTransform, OTransition, OTransitionDelay, OTransitionDuration, OTransitionProperty, OTransitionTimingFunction (etc) by comparing the generated lists from Opera 10.1 and Opera 10.5.
SVN commit 1067634 by orlovich: Enumerate dynamic properties in CSSStyleDeclaration (Note: this includes the SVG properties as well...) BUG:220627 M +28 -4 kjs_css.cpp M +5 -4 kjs_css.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1067634
FWIW, http://lxr.kde.org/source/KDE/kdelibs/khtml/css/cssproperties.in gives all supported properties.
It is now at http://lxr.kde.org/source/kde/kdelibs-git/khtml/css/cssproperties.in DHTML demo on listing CSS properties: List of computed style property value for each style property of body node http://www.gtalbot.org/DHTMLSection/ListComputedStylePropertyValues.html (I may improve this demo or make it more versatile one day) One detail worth mentioning. At least one property ( shorthand borderRadius ) is not settable dynamically in Konqueror 4.6 while it will be listed in both cssproperties.in and in my demopage. The workaround is to set all 4 properties: borderBottomLeftRadius, borderBottomRightRadius, borderTopLeftRadius, borderTopRightRadius regards, Gérard