this.btoa = function (str) { const result = btoa(str); if (result === null) { throw new DOMException("The string to be encoded contains invalid characters.", "InvalidCharacterError"); } return result; };
this.btoa = function (str) { const result = btoa(str); if (result === null) { throw new DOMException(DOMException.INVALID_CHARACTER_ERR, "The string to be encoded contains invalid characters."); } return result; };