[Webkit-unassigned] [Bug 14462] New: non empty <style> element doesn't work
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 29 12:41:15 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=14462
Summary: non empty <style> element doesn't work
Product: WebKit
Version: 522+ (nightly)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.4
Status: UNCONFIRMED
Severity: Minor
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: hartman at videolan.org
I was trying to do the following in Javascript
var stylesheet = document.createElement('style');
stylesheet.type = 'text/css';
stylesheet.rel = 'stylesheet';
document.getElementsByTagName("head")[0].appendChild(stylesheet);
var styles = stylesheet.sheet ? stylesheet.sheet : stylesheet.styleSheet;
However this would not work, when testing the value styles, it was null. With
help from mitzpettel on #webkit IRC it was determined I needed to add:
stylesheet.appendChild(document.createTextNode()); before appending the new
style-element to the head-element.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list