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] 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 f01481aaac..913d91374b 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