# Javascript

Alchemy Options comes with some client-side helpers, available in the global `alchemyOptions` variable. Functions use the wonderful [kew](https://github.com/Medium/kew) library as a light-weight promises polyfill.

Functions have been tested in Internet Explorer 10 and newer. All modern browsers should do just fine.

## Howto

A light-weight(10Kb minified, NOT gzipped) script is registered as `alchemy-options-client-scripts`. Add it as a dependency if you want to use it, like so:

```php
wp_enqueue_script( 'my-scripts', '/path/to/my-scripts.js', array( 'alchemy-options-client-scripts' ), '1.0', true );
```

## Available functions

* [getOption](/v0.9/javascript/get_option.md)
* [getNetworkOption](/v0.9/javascript/get_network_option.md)
* [getPostMeta](/v0.9/javascript/get_post_meta.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alchemy-options.com/v0.9/javascript.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
