-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Uncaught Error: Component's "only-when-overflow" property should be a function, but got [boolean] instead #4085
Comments
Gotcha, this is caused by our function check here instead we could check whether the third character is an uppercase-letter by doing |
@JoviDeCroock Wondering if we could limit the warning only to native HTML elements. Like check only do the check if the element name doesn't have a |
Ohh I mistakenly thought it would only affect the debug check. Doing I'm not sure what the best path forward is. It's really unfortunate that custom elements don't seem to give you a way to check what properties they expose. |
@marvinhagemeister a cheaper alternative would be https://github.com/preactjs/preact/compare/custom-element-func-safety-2?expand=1 |
Describe the bug
I'm using a custom web component called
my-tooltip
and there's a boolean attribute calledonly-when-overflow
.When using theonly-when-overflow
attribute i'm getting the below error.To Reproduce
We usually use a attribute which starts with
on
to handle events eg:onClick, onKeyPress
which requires function. Here I'm using a boolean attribute which starts withon
and the error thrownThe text was updated successfully, but these errors were encountered: