daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // backup original libxmljs nextSibling() to newly named method
  2. libxmljs.Element.prototype.nextSiblingOld = libxmljs.Element.prototype.nextSibling;
  3.  
  4. // new dom method, use a getter because this is invoked as an attribute
  5. Object.defineProperties(libxmljs.Element.prototype, {
  6.   nextSibling: {
  7.     get: function() {
  8.       return this.nextSiblingOld();
  9.     }
  10.   }
  11. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top