@bendrucker how do you create an idempotent window context? Do you use Raynos' thing? Want to access window.HTMLElement.prototype on server
-
-
Replying to @yoshuawuyts
@yoshuawuyts yeah I use global which relies on min-document for the (partial) DOM shim1 reply 0 retweets 1 like -
-
Replying to @yoshuawuyts
@bendrucker ah crap window.HTMLElement.prototype isn't in there. Means I'll need to use jsdom; but don't wanna use it in browser. hmmm1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts You could expose https://github.com/Raynos/min-document/blob/master/dom-element.js …, perhaps even do a pkg so you can `require(‘html-element’)`1 reply 0 retweets 0 likes -
Replying to @bendrucker
@bendrucker ohey, so if I do DOMElement('button') I should get the button prototype right? This could solve my issues! :D2 replies 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts You’d get an element instance with a tagName of button, but yeah in a lot of case it’ll work1 reply 0 retweets 0 likes
@bendrucker yeah, like: I want to then turn it back into an html tag with a bunch of props on it (SSR); reckon it's good enough for that! :D
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.