devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
395 stars 17 forks source link

Range node error when parsing Template tokens. #209

Open snuggs opened 4 years ago

snuggs commented 4 years ago

https://jsbin.com/josicejeja/edit?html,output

Capture d’écran 2020-04-14 à 12 53 33

brandondees commented 4 years ago

This doesn't look identical to what I saw in my codepen recently, but I did have something that may be similar or related something about Range when trying to use Template() and Element() together in a script without doing html imports (because it's a single codepen). If I want a custom element/component to be upgraded to use a template for rendering, what's the recommended approach? I dug through the repo a little but all the examples I could find seemed to depend on some scoping properties of html imports.

snuggs commented 4 years ago

Where is @brandondees and what have you done to him. WOW MAN YOU GET IT! Talking the lingo and everything LOL. Before we get deep in this weed have to know what initiated it. Wanted to give an example here but codepen blew up on me. https://github.com/whatwg/html/issues/4219

Like I said years ago @brandondees give it enough time and will see signals from the platform. You're more ahead than you think! Folks (still) catching up.

brandondees commented 4 years ago

@snuggs yeah I know how that goes. question is, can snuggsi be used this way today or not? I'm using react+redux+thunk at work now and some of those concepts have infected my perspective on how to approach browser apps in general, so basically, I want to update a single source of application state without explicitly touching the DOM, and have the DOM be updated by the custom element in response using native templates and a little custom element logic as needed. I'm still a little stuck on the "render a custom element using a template" piece first though, which is the piece i'd like to be using everywhere regardless of app logic.

p.s. - would love to catch up soon, it's been too long.

danielchristopher1 commented 4 years ago

Hey I'm getting this error too when running the template example in readme.

snuggs commented 4 years ago

@danielchristopher1 thanks a bunch! And welcome aboard! Is this @RobertChristopher brother? Check your email ;-)

danielchristopher1 commented 4 years ago

@snuggs yes. Robert and I have been thinking of Snuggsi / Devpunks and are very curious to learn more about what's happening with these projects. I sense some profound realizations about the web happening here and definitely think that developing this way is a part of a larger mindset shift in not only code but lifestyle. This is pushing for a progressive era... I see the power in recomposable conventional elements and already apply these principles to so many other areas of my life. I even store all of my notes as a web of recomposable elements that helps me map and sample my daily awareness. It feels more like how the web could be if it was turned back from the corporate monopolies. Could talk about this forever.... Anyways, I thought I'd let you know how excited I am about Devpunks! Hope you're well Snuggs! I've switched emails you can now contact me at cvpitalDC@gmail.com.