Define "vanilla wc". Feels like a leading question to me.
-
-
Replying to @matthewcp
Ummm - plain web component? I don’t know what the pieces are called, but could I write it, then have someone import that file, register the name and use it about identically to what’s in the screenshot? This seems like it should be a bread and butter use case for wc.
1 reply 0 retweets 0 likes -
Replying to @AdamRackis @matthewcp
I'm now remembering talk of web components only being able to accept string properties, and so objects or functions would require a framework like Skate? Does that sound about right?
2 replies 0 retweets 0 likes -
Replying to @AdamRackis @matthewcp
Web components can accept any sort of property value. They're just DOM. Attributes from markup, of course, come in as strings, but it's up to the component how (or if) to handle those.
1 reply 0 retweets 2 likes -
Replying to @slightlylate @matthewcp
Thanks a ton - this confirms what I thought others had said. How radical / breaking / disruptive of a change would it be though to let html parse real props as objects / functions in attribute positions, and sync to wc props. Wouldn’t that really boost wc’s abilities?
1 reply 0 retweets 1 like -
Replying to @AdamRackis @matthewcp
This question doesn't make sense. HTML is a text format. You parse from text. DOM is a live tree representation in the heap. As such, it can receive objects.
1 reply 0 retweets 1 like -
Replying to @slightlylate @matthewcp
Would require some “upgrades” to the html parsing, no doubt :)
1 reply 0 retweets 0 likes -
Replying to @AdamRackis @matthewcp
These are different things. I don't understand why this isn't clear
1 reply 0 retweets 0 likes -
Attributes don't exist in React because it isn't parseable from strings. HTML is, so it has this extra complication. Basic stuff.
1 reply 0 retweets 2 likes -
Replying to @slightlylate @matthewcp
I understand well enough the pieces as they exist today. I’m just wondering why a seismic change in how html is processed couldn’t be achieved in the future.
1 reply 0 retweets 0 likes
HTML is parsed from strings. That will always be true, if only at startup. That means the moment when string-valued attributes are encountered will continue to exist.
-
-
Replying to @slightlylate @matthewcp
Not to be contrarian, but JS is parsed from strings, too
. So it’s just a non-started iyo that html parsing will ever be equipped to parse and comprehend non-string values, to do more with wc?0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.