Skip to main content
Version: 1.0.0

Writing Code

This section aims to provide you with detailed guidance on how to write, structure, and manage code effectively when developing with our plugin.

Topics Covered

  1. The window.yui Object

    • Description: Learn about the window.yui object, which acts as a central hub for all JavaScript interactions within the plugin.
    • Usage: How to initialize and use the window.yui object in your projects.
  2. Building URLs in JavaScript

    • Description: Understand how to dynamically construct URLs using JavaScript.
    • Usage: Techniques and best practices for building URLs that work seamlessly with your Craft CMS setup.
  3. Using fetch()

    • Description: A guide to using the fetch() API for making asynchronous requests.
    • Usage: Examples of fetching data from your Craft CMS endpoints and handling responses.