dotlottie-web
dotlottie-web copied to clipboard
dotlottie-wc getters do not reflect dotLottie instance state
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
- Add the
dotlottie-wccomponent 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> - Access the
loopproperty using JavaScript:const dotLottieElement = document.querySelector("dotlottie-wc"); console.log("loop:", dotLottieElement.loop); // undefined - Observe that the
loopproperty is not reflecting thedotLottieinstance 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
- [x] Add the
Type: Buglabel to this issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.