From 413607a991bab8489a4c8466b98ef4bc47ab32de Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Fri, 16 Mar 2012 12:24:49 +0100 Subject: [PATCH] don't write to read only property in IE10 fixes #669 --- lib/ace/lib/dom.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ace/lib/dom.js b/lib/ace/lib/dom.js index 4c5af70d..f6727078 100644 --- a/lib/ace/lib/dom.js +++ b/lib/ace/lib/dom.js @@ -122,7 +122,7 @@ exports.hasCssString = function(id, doc) { if (doc.createStyleSheet && (sheets = doc.styleSheets)) { while (index < sheets.length) - if (sheets[index++].title === id) return true; + if (sheets[index++].owningElement.id === id) return true; } else if ((sheets = doc.getElementsByTagName("style"))) { while (index < sheets.length) if (sheets[index++].id === id) return true; @@ -143,7 +143,7 @@ exports.importCssString = function importCssString(cssText, id, doc) { style = doc.createStyleSheet(); style.cssText = cssText; if (id) - style.title = id; + style.owningElement.id = id; } else { style = doc.createElementNS ? doc.createElementNS(XHTML_NS, "style") @@ -289,4 +289,4 @@ exports.getParentWindow = function(document) { return document.defaultView || document.parentWindow; }; -}); +}); \ No newline at end of file