SAPUI5 - use btoa / atob in case of Base64.js is not initial

Example in case of Base64 object is not defined.
You can use default encode/decode from browser instead.
var base64Id = (typeof Base64 === "object") ?
                    Base64.encode(oForm) :
                    window.btoa(unescape(encodeURIComponent(oForm)))



Another example of btoa / atob .
var sUnicodeText = "SAPUI5 🚀";
var sEncodedUnicode = window.btoa(unescape(encodeURIComponent(sUnicodeText)));

var sDecodedUnicode = decodeURIComponent(escape(window.atob(sEncodedUnicode)));

Popular posts from this blog

SAP CPI - Loop Process Call with SuccessFactor (oData V2)

C# - BASE64 to Image

PHP - cURL (post by parameter)