drupal/general_example

Testing for Packagist Integration

1.0.x-dev 2022-04-14 22:32 UTC

This package is not auto-updated.

Last update: 2024-04-27 06:33:41 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: