# Javascript Web SDK

The Javascript Web SDK is a way to interact with the iAdvize solution from the client side.

## Safely accessing the iAdvize object <a href="#safely-accessing-the-iadvize-object" id="safely-accessing-the-iadvize-object"></a>

If the iAdvize tag was installed using the recommended script (see <https://ha.iadvize.com/admin/site/current/code>), a global `window.iAdvizeInterface` should be available. You can safely push functions inside `window.iAdvizeInterface` : they are guaranteed to be executed once the iAdvize tag is fully loaded.

```javascript
window.iAdvizeInterface = window.iAdvizeInterface || [];
window.iAdvizeInterface.push(function(iAdvize) {
  // Ex : accessing the tag version
  const tagVersion = iAdvize.get('tag:version');
});
```


---

# 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.iadvize.dev/technologies/web-and-mobile-sdk/javascript-web-sdk.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.
