Wrap setInnerHTML in Windows 8 apps
Steve Baker committed
Jan 1, 2015 at 20:26 UTC
3287ea52fe4779247e523d814bc40d3680879779
1 file changed
+9
src/browser/ui/dom/setInnerHTML.js
+9
@@ -28,6 +28,15 @@ var setInnerHTML = function(node, html) {
28
node.innerHTML = html;
29
};
30
31
+// Win8 apps: Allow all html to be inserted
32
+if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
33
+ setInnerHTML = function (node, html) {
34
+ MSApp.execUnsafeLocalFunction(function () {
35
+ node.innerHTML = html;
36
+ });
37
+ };
38
+}
39
+
40
if (ExecutionEnvironment.canUseDOM) {
41
// IE8: When updating a just created node with innerHTML only leading
42
// whitespace is removed. When updating an existing node with innerHTML