modifying LINK attributes via DOM
Emmanuel le Chevoir
manu.3rd at free.fr
Tue May 27 15:05:22 BST 2003
Hi!
First, let me apologize, for I know this might not be the right place to
report problems and fill bugreports. Still, I'm seeking answers and
workarounds, and you may help me.
I noticed that, though Konqueror (3.1.2, Debian Package) allows DOM
manipulation on LINK elements, the changes are not visually applied. My
English being really poor, I made a use-case (attached to this mail) for
you to understand the problem.
Basically, I'm trying to get ALA styleswitcher to work (which I stripped
down and modified slightly for the use-case).
The main problem lies in the function setActiveStyleSheet():
- First, it retrieves the whole list of < link > elements, via
document.getElementsByTagName("link").
- Then it searches through the list to locate the style to apply and
enables it. Other links are disabled during the parsing operation.
My use-case function will remove the other link tags instead of
disabling them, and change the "rel" attribute of the selected stylesheet
to "stylesheet", making it the default. Still, no changes get
reflected. Using the DOM Parser, though, you can see the whole DOM tree
has been updated properly.
Does anyone have a solution, a workaround or anything useful that would
allow me to dynamically change my stylesheets, using plain HTML, CSS,
and DOM?
Thanks in advance. I hope the use-case helps, if the bug still exists in HEAD.
--
Emmanuel le Chevoir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030527/d7f04e2d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: black.css
Type: text/css
Size: 99 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030527/d7f04e2d/attachment.css>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: white.css
Type: text/css
Size: 79 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20030527/d7f04e2d/attachment-0001.css>
More information about the kfm-devel
mailing list