Agastya API

by Anand Chowdhary

HTML

<div id="app"></div>

<h1>
API
</h1>
<h2>
Agastya by Oswald Labs
</h2>

<!-- Load staging Agastya asasynchronously -->
<script
  async defer
  src="https://staging-agastya-loader.oswaldlabs.com/examples.js"
></script>

CSS

body {
  font-family: sans-serif;
}

JavaScript

window.a11ySettings = window.a11ySettings || {};
window.a11ySettings.appendTo = "#app";
window.a11ySettings.on = {
  // Do this when Agastya is ready
	ready: agastya => {
    // Now we have a global window.agastya
    console.log("Agastya is ready!");
		agastya.api("enableMode", "night");
  }
};