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

Add assetStringify for asset based properties #5544

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Jun 16, 2024

Description:
Asset based property types could either be a string, or directly refer to an HTMLElement (using an id selector, or passing instance to it). The stringification used for these property types was just the default one, which works for strings, but fails for HTMLElement instances.

This PR introduces an assetStringify that attempts to construct a suitable id selector. In case that isn't possible it will resort to using the src attribute instead.

See aframevr/aframe-inspector#722 for some context where this caused issues when using flushToDOM.

Changes proposed:

  • Introduce an assetStringify for asset based property types

@dmarcos
Copy link
Member

dmarcos commented Jun 18, 2024

Thank you!

@dmarcos
Copy link
Member

dmarcos commented Jun 18, 2024

Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants