aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-16 16:23:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-16 16:23:23 -0700
commitdb5bbebf047ed9cc71ed203cbff26d7ad1c3118a (patch)
treef83dbb306f3ae4b487720e00b9736c74f936c7e6
parentac2c7bda57e677d2dbff2f58e70c8aa774a8e941 (diff)
fake document.styleSheets
-rw-r--r--src/proxyWorker.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/proxyWorker.js b/src/proxyWorker.js
index 70b55244..94dfa37f 100644
--- a/src/proxyWorker.js
+++ b/src/proxyWorker.js
@@ -100,6 +100,13 @@ document.createElement = function document_createElement(what) {
document.documentElement = {};
+document.styleSheets = [{
+ cssRules: [], // TODO: forward to client
+ insertRule: function(rule, i) {
+ this.cssRules.splice(i, 0, rule);
+ }
+}];
+
if (typeof console === 'undefined') {
var console = {
log: function(x) {