From 3287ea52fe4779247e523d814bc40d3680879779 Mon Sep 17 00:00:00 2001 From: Steve Baker <_steve_@outlook.com> Date: Thu, 1 Jan 2015 20:26:21 +0100 Subject: [PATCH 1/2] Wrap setInnerHTML in Windows 8 apps --- src/browser/ui/dom/setInnerHTML.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/browser/ui/dom/setInnerHTML.js b/src/browser/ui/dom/setInnerHTML.js index f01481aaacc..913d91374b6 100644 --- a/src/browser/ui/dom/setInnerHTML.js +++ b/src/browser/ui/dom/setInnerHTML.js @@ -28,6 +28,15 @@ var setInnerHTML = function(node, html) { node.innerHTML = html; }; +// Win8 apps: Allow all html to be inserted +if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + setInnerHTML = function (node, html) { + MSApp.execUnsafeLocalFunction(function () { + node.innerHTML = html; + }); + }; +} + if (ExecutionEnvironment.canUseDOM) { // IE8: When updating a just created node with innerHTML only leading // whitespace is removed. When updating an existing node with innerHTML From 9c55b961d3ef7a29ac426ab40ff59b45bff52a76 Mon Sep 17 00:00:00 2001 From: Steve Baker <_steve_@outlook.com> Date: Mon, 5 Jan 2015 18:21:53 +0100 Subject: [PATCH 2/2] code formatting fixes --- src/browser/ui/dom/setInnerHTML.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser/ui/dom/setInnerHTML.js b/src/browser/ui/dom/setInnerHTML.js index 913d91374b6..c2318ae4aa6 100644 --- a/src/browser/ui/dom/setInnerHTML.js +++ b/src/browser/ui/dom/setInnerHTML.js @@ -30,11 +30,11 @@ var setInnerHTML = function(node, html) { // Win8 apps: Allow all html to be inserted if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { - setInnerHTML = function (node, html) { - MSApp.execUnsafeLocalFunction(function () { - node.innerHTML = html; - }); - }; + setInnerHTML = function(node, html) { + MSApp.execUnsafeLocalFunction(function() { + node.innerHTML = html; + }); + }; } if (ExecutionEnvironment.canUseDOM) {