Rendering in Node.js throws when using attributes
See original GitHub issueThe following snippet fails:
function SomeView() {
return function() {
return ['div#foo', {foo: 'bar'}, 'some text']
}
}
var vm = domvm.view(SomeView)
vm.mount()
console.log(domvm.html(vm.node))
The rendering routine calls utils.isElem
during the process, which causes to throw RefereceError: HTMLElement is not defined
. I looked at the code and I see that val instanceof HTMLElement
is the root of this error. May be typeof HTMLElement !== 'undefined'
or choosing a different strategy for Node.js could solve the problem.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Express Handlebars Won't Render Data - Stack Overflow
I am working with NodeJS and Express using Express-Handlebars template engine. According to the above link: From version 4.6. 0 on, Handlebars ...
Read more >Render dynamic content in Node.js using templates
In this article, we will see how we can render the front-end using Node.js which is very helpful to display static or dynamic...
Read more >wont render after hitting a specified route. · Issue #1420 - GitHub
Node.js Version: 9.5.0 OS: mcOS High Sierra 10.13.06 Scope ... express@4.16.3 Hello, I'm having a trouble rendering a template. on my ...
Read more >Top 10 Most Common Node.js Developer Mistakes - Toptal
Mistake #6: Throwing Errors from Inside Callbacks. JavaScript has the notion of exceptions. Mimicking the syntax of almost all traditional languages with ......
Read more >Adventures in the Virtual DOM — Part 4: Rendering Attributes
An attribute is something defined in the actual HTML that we would use the JavaScript methods setAttribute and removeAttribute to change.
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
yeah, aliased “USB Channel”
Thats convergence… regarding I adopt the coding standard of the project I’m contributing to, and the simplicity of the solution, every implementation would looks near identical.
Well, I wrote the code yesterday but copied/pasted/pushed this morning to discuss about it, since I have no internet in home 😦