dotlottie-web icon indicating copy to clipboard operation
dotlottie-web copied to clipboard

dotlottie-wc getters do not reflect dotLottie instance state

Open theashraf opened this issue 1 year ago • 1 comments

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

  • [x] Add the Type: Bug label to this issue.

theashraf avatar Dec 01 '24 08:12 theashraf

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.

github-actions[bot] avatar Mar 26 '25 02:03 github-actions[bot]