diff --git a/.gitignore b/.gitignore index 4f18d42..d56c4f8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ package-lock.json .DS_Store _SpecRunner.html .grunt/ +.idea/ diff --git a/dist/rxp-js.js b/dist/rxp-js.js index 6b7b1ef..c781644 100644 --- a/dist/rxp-js.js +++ b/dist/rxp-js.js @@ -1,10 +1,12 @@ -/*! rxp-js - v1.5.0 - 2021-07-27 +/*! rxp-js - v1.5.1 - 2021-09-27 * The official Realex Payments JS Library * https://github.com/realexpayments/rxp-js * Licensed MIT */ Element.prototype.remove = function() { - this.parentElement.removeChild(this); + if (this.parentElement) { + this.parentElement.removeChild(this); + } }; NodeList.prototype.remove = HTMLCollection.prototype.remove = function() { for(var i = this.length - 1; i >= 0; i--) { diff --git a/dist/rxp-js.min.js b/dist/rxp-js.min.js index 56ad758..09ca3ba 100644 --- a/dist/rxp-js.min.js +++ b/dist/rxp-js.min.js @@ -1,7 +1,7 @@ -/*! rxp-js - v1.5.0 - 2021-07-27 +/*! rxp-js - v1.5.1 - 2021-09-27 * The official Realex Payments JS Library * https://github.com/realexpayments/rxp-js * Licensed MIT */ -Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=this.length-1;e>=0;e--)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])};var RealexHpp=function(){"use strict";var e,t,n="https://pay.realexpayments.com/pay",A=A||Math.random().toString(16).substr(2,8),i=360,o=/Windows Phone|IEMobile/.test(navigator.userAgent),r=/Android|iPad|iPhone|iPod/.test(navigator.userAgent),a=function(){return(window.innerWidth>0?window.innerWidth:screen.width)<=i||(window.innerHeight>0?window.innerHeight:screen.Height)<=i},d=o,s=function(){return!o&&(r||a())},c={evtMsg:[],addEvtMsgListener:function(e){this.evtMsg.push({fct:e,opt:!1}),window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("message",e)},removeOldEvtMsgListener:function(){if(this.evtMsg.length>0){var e=this.evtMsg.pop();window.addEventListener?window.removeEventListener("message",e.fct,e.opt):window.detachEvent("message",e.fct)}},base64:{encode:function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e=escape(e);var n,A,i,o,r,a="",d="",s="",c=0;do{i=(n=e.charCodeAt(c++))>>2,o=(3&n)<<4|(A=e.charCodeAt(c++))>>4,r=(15&A)<<2|(d=e.charCodeAt(c++))>>6,s=63&d,isNaN(A)?r=s=64:isNaN(d)&&(s=64),a=a+t.charAt(i)+t.charAt(o)+t.charAt(r)+t.charAt(s),n=A=d="",i=o=r=s=""}while(c