From 873fbb3336dc7b8f756628fe59e8be9b683109e2 Mon Sep 17 00:00:00 2001 From: shuizhongyueming Date: Wed, 2 Sep 2015 16:38:39 +0800 Subject: [PATCH 1/2] make the shimed createRange can get a real doc not null --- src/core/wrappedrange.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/wrappedrange.js b/src/core/wrappedrange.js index 88ea7264..66030544 100644 --- a/src/core/wrappedrange.js +++ b/src/core/wrappedrange.js @@ -613,6 +613,6 @@ return api.createRange(doc); }; } - doc = win = null; + win = null; }); -}); \ No newline at end of file +}); From 03ba072388209ad7acb7ad2e72a8aaf0087fdad2 Mon Sep 17 00:00:00 2001 From: shuizhongyueming Date: Wed, 2 Sep 2015 16:39:09 +0800 Subject: [PATCH 2/2] make the shimed getSelection can get a real win, not null --- src/core/wrappedselection.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/wrappedselection.js b/src/core/wrappedselection.js index 1168211d..ddbb792b 100644 --- a/src/core/wrappedselection.js +++ b/src/core/wrappedselection.js @@ -1021,6 +1021,5 @@ return getSelection(win); }; } - win = null; }); });