aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/compatibility.js
diff options
context:
space:
mode:
authorPellaeon Lin <nfsmwlin@gmail.com>2013-05-12 22:32:22 +0800
committerPellaeon Lin <nfsmwlin@gmail.com>2013-05-12 22:32:22 +0800
commit935675ab4964e7cabc1de2f31cafbca6548c88b3 (patch)
treeee353aaa2e5d018c4f4b4abb8d02b5c609f456f6 /core/js/compatibility.js
parent340940389350747c14acad89ced6ae5f731a6e65 (diff)
parentc5cb3f957761ffbbc615a6806d84ad0a9d0cec13 (diff)
downloadnextcloud-server-935675ab4964e7cabc1de2f31cafbca6548c88b3.tar.gz
nextcloud-server-935675ab4964e7cabc1de2f31cafbca6548c88b3.zip
Merge remote-tracking branch 'upstream/master' into pr-langcode
Diffstat (limited to 'core/js/compatibility.js')
-rw-r--r--core/js/compatibility.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/js/compatibility.js b/core/js/compatibility.js
index cc37949409d..b690803ca77 100644
--- a/core/js/compatibility.js
+++ b/core/js/compatibility.js
@@ -133,4 +133,18 @@ if(!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^\s+|\s+$/g,'');
};
-} \ No newline at end of file
+}
+
+// Older Firefoxes doesn't support outerHTML
+// From http://stackoverflow.com/questions/1700870/how-do-i-do-outerhtml-in-firefox#answer-3819589
+function outerHTML(node){
+ // In newer browsers use the internal property otherwise build a wrapper.
+ return node.outerHTML || (
+ function(n){
+ var div = document.createElement('div'), h;
+ div.appendChild( n.cloneNode(true) );
+ h = div.innerHTML;
+ div = null;
+ return h;
+ })(node);
+}