drupal/general_example

Testing for Packagist Integration

1.0.0 2022-04-14 15:33 UTC

This package is auto-updated.

Last update: 2024-12-10 21:34:37 UTC


README

This project is for testing.

Documentation and examples

Example (Use as a module)

<script type="module">
  import once from 'https://unpkg.com/@drupal/once@latest/dist/once.esm.js';
  const elements = once('my-once-id', 'div');
  // Initialize elements.
  elements.forEach(el => el.innerHTML = 'processed');
</script>

Example (Use as a regular script)

<script src="https://unpkg.com/@drupal/once@latest/dist/once.min.js"></script>
<script>
  const elements = once('my-once-id', 'div');
  // Initialize elements.
  elements.forEach(el => el.innerHTML = 'processed');
</script>

Full API documentation and examples in the API docs.

Contributors

These amazing people have contributed code to this project: