From 647fd97bef55d2371e87f0cd418ddff62f36800e Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Wed, 24 Oct 2012 15:33:56 -0400 Subject: Use insertCSS() API instead of manually created style element. For some reason addCssToPage seemed to break on Chrome 24. Closes #676. --- lib/dom_utils.coffee | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'lib') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 501e43a5..a99cb5a6 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -1,19 +1,4 @@ DomUtils = - # - # Adds the given CSS to the page. - # - addCssToPage: (css, id) -> - return if document.getElementById(id) - head = document.getElementsByTagName("head")[0] - if (!head) - head = document.createElement("head") - document.documentElement.appendChild(head) - style = document.createElement("style") - style.id = id - style.type = "text/css" - style.appendChild(document.createTextNode(css)) - head.appendChild(style) - # # Runs :callback if the DOM has loaded, otherwise runs it on load # -- cgit v1.2.3