> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-d5730eee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript Interfaces for X for Websites

> Overview of the X for Websites JavaScript API for enhancing embedded Posts, timelines, and Web Intents on your site with dynamic widget loading and events.

If you’re integrating your site with X using [X for Websites](/x-for-websites/overview) and [Web Intents](/x-for-websites/web-intents/overview), you can enhance your application using JavaScript. By default, `widgets-js` will find markup in a page and convert basic, functional mark-up into rich interactive widgets. In addition, there are a number of functions of `widgets-js` that allow developers to work with X content dynamically, after the page has loaded.

This documentation has been broken into chapters:

* [Setting up X for Websites](/x-for-websites/javascript-api/guides/set-up-x-for-websites)
* [Controlling Loading and Initialization of Widgets](/x-for-websites/javascript-api/guides/scripting-loading-and-initialization)
* [Factory functions to generate widgets](/x-for-websites/javascript-api/guides/scripting-factory-functions)
* [Events from widgets and Web Intents](/x-for-websites/javascript-api/guides/javascript-api)

These functions make it possible to integrate a X user’s content into your site dynamically in a JavaScript application, and integrate user interactions into your own application experience.

Please ask questions and share your code and examples in the [developer forum](https://devcommunity.x.com/). You may also refer to the main [X for Websites documentation](/x-for-websites/javascript-api/guides/set-up-x-for-websites).
