From 86cae37cb6ff132605c2e437faaec5bc76593ceb Mon Sep 17 00:00:00 2001 From: Deathamns Date: Mon, 12 Jan 2015 20:39:23 +0100 Subject: [PATCH] Implement vAPI.insertHTML The purpose of this API is basically to satisfy AMO reviewers in the future, since the use of innerHTML with variables (i.e., not plain text) will be rejected without any questions. Since this is not a problem for browsers other than Firefox, they will use simple innerHTML assignment, however safe-parsing could be implemented for them too. --- platform/chromium/vapi-common.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/chromium/vapi-common.js b/platform/chromium/vapi-common.js index 9fcffc8..e04b5d7 100644 --- a/platform/chromium/vapi-common.js +++ b/platform/chromium/vapi-common.js @@ -73,6 +73,12 @@ vAPI.download = function(details) { /******************************************************************************/ +vAPI.insertHTML = function(node, html) { + node.innerHTML = html; +}; + +/******************************************************************************/ + vAPI.getURL = chrome.runtime.getURL; /******************************************************************************/