Important: As of Firefox 52, the methods defined in this mixin have been moved to the WindowOrWorkerGlobalScope
mixin, and other browsers will follow suit. Look to that page for up-to-date details.
The WindowBase64
helper contains utility methods to convert data to and from base64, a binary-to-text encoding scheme. For example it is used in data URIs.
There is no object of this type, though the context object, either the Window
for regular browsing scope, or the WorkerGlobalScope
for workers, implements it.
This helper neither defines nor inherits any properties.
This helper does not inherit any methods.
WindowBase64.atob()
WindowBase64.btoa()
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of 'WindowBase64' in that specification. | Living Standard | No change since the latest snapshot, HTML5.1. |
HTML5.1 The definition of 'WindowBase64' in that specification. | Recommendation | Snapshot of WHATWG HTML Living Standard. No change. |
HTML5 The definition of 'WindowBase64' in that specification. | Recommendation | Snapshot of WHATWG HTML Living Standard. Creation of WindowBase64 (properties where on the target before it). |
Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 1.0 (1.7 or earlier) [1] | (Yes) | 10.0 | (Yes) | (Yes) |
Feature | Firefox Mobile (Gecko) | Android | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 1.0 (1) | (Yes) | (Yes) | (Yes) | (Yes) |
[1] atob()
is also available to XPCOM components implemented in JavaScript, even though Window
is not the global object in components.
Window
, WorkerGlobalScope
, DedicatedWorkerGlobalScope
, SharedWorkerGlobalScope
, and ServiceWorkerGlobalScope
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64