# PlutoScript Provides ` ``` ## Example A simple example is the Base32 Encoder tool that is [available online here](https://pluto-lang.org/PlutoScript/base32.html). Barring the script tags needed for PlutoScript's usage, this is the entire source code: ```html ``` ## JavaScript API - `pluto_require(src)` - `pluto_load(code)` - `pluto_invoke(name, ...args)` can be used to invoke a global Pluto function - `pluto_give_file(name, data)` writes a string or Uint8Array for Pluto code to read from the file with the given name ## Pluto API - `js_invoke(name, ...args)` can be used to invoke a global JavaScript function - `window.__index.__call`: You can call any method on 'window', e.g. `window.alert("Hello")` - `document.getElementById(x)` returns an Element instance with path `$"#{x}"` - `document.querySelector(x)` returns an Element instance with path `x` - `Element.__index`/`Element.__newindex`: You can read and write any property of an Element, e.g. `.value` - `Element:addEventListener(evt, func)` - `Element:addClass(name)` - `Element:removeClass(name)` - `Element:setAttribute(name, value)` - `Element:removeAttribute(name)`