Skip to content

feat: allow opt-out of define() #174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

andreruffert
Copy link
Owner

What changed (additional context)

Introduce option to opt-out of define() by adding a ?define=false query parameter to the import/script URL.

  • Allows the use of a different tag name
  • Run some additional configuration before definition etc.
<script type="module">
  // <progressive-image> is not automatically defined
  import "progressive-image-element?define=false";

  // ...

  ProgressiveImageElement.define("different-tag-name");
</script>

Introduce option to opt-out of `define()` by adding a `?define=false` query parameter to the import/script URL

- allows the use of a different tag name
- run some additional advanced configuration before definition etc.
@andreruffert andreruffert added the enhancement New feature or request label Mar 25, 2025
@andreruffert andreruffert merged commit f473c68 into main Mar 25, 2025
1 check passed
@andreruffert andreruffert deleted the element-define-optout-option branch March 25, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant