summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/misc.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-10-21 15:22:36 +0200
committerChristophe Simonis <chs@odoo.com>2017-10-21 15:22:36 +0200
commitde987831da237ed5f9c96d50a9e51d083e072aa0 (patch)
treeef714d2d98693eae3446620d28bb48314573018a /addons/web/static/src/js/core/misc.js
parentea2a976f31b2611b6b4ff69f4a5cdc2ffc7798fe (diff)
parentd70518d04f8f8061c8c683ea4ba8c95ae631ae45 (diff)
[MERGE] forward port branch 11.0 up to d70518d04f8
Diffstat (limited to 'addons/web/static/src/js/core/misc.js')
-rw-r--r--addons/web/static/src/js/core/misc.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/addons/web/static/src/js/core/misc.js b/addons/web/static/src/js/core/misc.js
index 64ebeeb1794..983b26d3606 100644
--- a/addons/web/static/src/js/core/misc.js
+++ b/addons/web/static/src/js/core/misc.js
@@ -173,6 +173,23 @@ function ReloadContext (parent, action) {
}
core.action_registry.add("reload_context", ReloadContext);
+// In Internet Explorer, document doesn't have the contains method, so we make a
+// polyfill for the method in order to be compatible.
+if (!document.contains) {
+ document.contains = function contains (node) {
+ if (!(0 in arguments)) {
+ throw new TypeError('1 argument is required');
+ }
+
+ do {
+ if (this === node) {
+ return true;
+ }
+ } while (node = node && node.parentNode);
+
+ return false;
+ };
+}
return {
blockUI: blockUI,