[iOS][Rendering] Having a `height` property in a custom element causes errors
See original GitHub issuePlatform
What platform is your issue or question related to? (Delete other platforms).
- iOS
Author or host
Host
Version of SDK
2.4.6
Details
A custom element with a property named “height” results in a parsing error:
Error Domain=ACRParseErrorDomain Code=3 "(null)"
“width”, “w”, “h” are all OK. But not “height”.
This actually took me a long time to figure out and I even filed a different bug (#5300) thinking it had a different cause.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Custom elements are not "cleaned up ...
Hey guys, it appears that custom-elements don't get cleaned up fully when a parent application removes them from the DOM.
Read more >Element type is invalid: expected a string (for built-in ...
Error : Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Read more >How To Fix Cumulative Layout Shift (CLS) Issues
The Cumulative Layout Shift metric is causing trouble to a lot of sites, so let's have a look at ways of addressing any...
Read more >4 reasons your z-index isn't working (and how to fix it)
Z-index is a CSS property that allows you to position elements in layers on top of one another. It's super useful, and honestly...
Read more >Shadow DOM v1 - Self-Contained Web Components
The first is that the custom element creates its own shadow DOM when an instance of <fancy-tabs> is created. That's done in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK makes sense (and I already switched to ‘w’ and ‘h’). Closing.
@jscalo hey, so I debugged it with the payload. you should treat the height property as a reserved keyword. The reason is that we treat all elements including customs types as derived ones from BaseCardElement, and the BaseCardElement has the height property, and its type is an enum when deserialized, and our parser expects the value to be in the string; that’s the reason for the parser failure. Valid json values are “stretch” and “auto”.