-
Couldn't load subscription status.
- Fork 2.5k
Open
Description
The addStyleSheet function creates a
element, sets its innerHTML to include a <style> tag, then attempts to insert the style element into the using p.lastChild. This approach can break in older IE versions (especially IE7 and below), where parsing of <style> inside another tag like
may not behave reliably.
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
Metadata
Metadata
Assignees
Labels
No labels