Guest User

Untitled

a guest
Jun 13th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  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. };
Add Comment
Please, Sign In to add comment