diff options
Diffstat (limited to 'js/binary/writer.js')
-rw-r--r-- | js/binary/writer.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/binary/writer.js b/js/binary/writer.js index 8a018058..287d29c3 100644 --- a/js/binary/writer.js +++ b/js/binary/writer.js @@ -236,10 +236,12 @@ jspb.BinaryWriter.prototype.getResultBuffer = function() { /** * Converts the encoded data into a base64-encoded string. + * @param {boolean=} opt_webSafe True indicates we should use a websafe + * alphabet, which does not require escaping for use in URLs. * @return {string} */ -jspb.BinaryWriter.prototype.getResultBase64String = function() { - return goog.crypt.base64.encodeByteArray(this.getResultBuffer()); +jspb.BinaryWriter.prototype.getResultBase64String = function(opt_webSafe) { + return goog.crypt.base64.encodeByteArray(this.getResultBuffer(), opt_webSafe); }; |