{{APIRef}}
The WindowBase64
interface contains utility methods to convert data to and from base64. There is no object of this type, though the context object, either the {{domxref("Window")}} for regular browsing scope, or the {{domxref("WorkerGlobalScope")}} for workers, implements it.
Properties
This interface defines no property.
Methods
- {{domxref("WindowBase64.atob()")}}
- Decodes a string of data which has been encoded using base-64 encoding.
- {{domxref("WindowBase64.btoa()")}}
- Creates a base-64 encoded ASCII string from a string of binary data.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', '#windowbase64', 'GlobalEventHandlers')}} | {{Spec2('HTML WHATWG')}} | No change since the latest snapshot, {{SpecName("HTML5.1")}}. |
{{SpecName('HTML5.1', '#windowbase64', 'GlobalEventHandlers')}} | {{Spec2('HTML5.1')}} | Snapshot of {{SpecName("HTML WHATWG")}}. No change. |
{{SpecName("HTML5 W3C", "#windowbase64", "GlobalEventHandlers")}} | {{Spec2('HTML5 W3C')}} | Snapshot of {{SpecName("HTML WHATWG")}}. Creation of WindowBase64 (properties where on the target before it). |
Browser compatibility
{{CompatibilityTable}}
Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatGeckoDesktop(0.9.9)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Firefox Mobile (Gecko) | Android | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatGeckoMobile(0.9.9)}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
See also
- {{domxref("Window")}}, {{domxref("WorkerGlobalScope")}}, {{domxref("DedicatedWorkerGlobalScope")}}, {{domxref("SharedWorkerGlobalScope")}}, and {{domxref("ServiceWorkerGlobalScope")}}