Skip to content
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

dotlottie-wc getters do not reflect dotLottie instance state #419

Open
1 task done
theashraf opened this issue Dec 1, 2024 · 0 comments
Open
1 task done

dotlottie-wc getters do not reflect dotLottie instance state #419

theashraf opened this issue Dec 1, 2024 · 0 comments
Labels
bug Something isn't working wc

Comments

@theashraf
Copy link
Member

Overview

The element getters in dotlottie-wc are not properly reflecting the dotLottie instance state. for example, the loop property on the dotlottie-wc element returns undefined, even when the attribute is set in the markup.

Steps to Reproduce

  1. Add the dotlottie-wc component to your project:
    <script type="module" src="https://unpkg.com/@lottiefiles/[email protected]/dist/dotlottie-wc.js"></script>
    <dotlottie-wc style="width: 300px" src="https://lottie.host/4db68bbd-31f6-4cd8-84eb-189de081159a/IGmMCqhzpt.lottie" autoplay="true" loop="true"></dotlottie-wc>
  2. Access the loop property using JavaScript:
    const dotLottieElement = document.querySelector("dotlottie-wc");
    console.log("loop:", dotLottieElement.loop); // undefined
  3. Observe that the loop property is not reflecting the dotLottie instance state.

Expected Behavior

The loop property should return true, matching the attribute defined in the markup.

Actual Behavior

The loop property returns undefined, indicating a mismatch between the attribute and the instance state.

Labels

  • Add the Type: Bug label to this issue.
@theashraf theashraf added bug Something isn't working wc labels Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wc
Projects
None yet
Development

No branches or pull requests

1 participant