|
|
|
|
|
by mg
671 days ago
|
|
What is the benefit of mixing js and html? el = <button>Click me</button> as HTMLButtonElement;
What would be the downside of el = html.button('<button>Click me</button>');
?That way no compilation step would be needed and debugging would be easier as the code executed in the browser is the same code the developer writes. |
|
I don't understand why people take such offense to calling document.createElement() or document.getElementById() or kind of document. or window. function. It's consistent and native.