This sentiment is an artifact of javascript being used to add functionality to an existing document, which is still a very useful case for javascript, and it seems people are dismissing it, which is a shame.
When you're building an application, something like the atom text editor, or the youtube video player — something interactive and ostensibly not a document — the segregation of markup and javascript is artificial. Yes, it's a good idea to keep your presentation separate from your logic (although religious devotion to this idea is unnecessary, it's just an abstraction that's useful has stood the test of time, not holy law), but your javascript view code is just as much a part of the presentation as the markup.
In response to a sibling comment, you claim "you dont want to mix the 'structure' of your UI with the behaviour". The fact that your views have a "structure" to begin with is again an artifact of the web's original intention of hosting documents rather than applications. The structure of your view is actually an implementation detail (a concept that's formalized by the Shadow DOM standard in the WebComponents proposal), and separating it out from your view code implies otherwise.
When you're building an application, something like the atom text editor, or the youtube video player — something interactive and ostensibly not a document — the segregation of markup and javascript is artificial. Yes, it's a good idea to keep your presentation separate from your logic (although religious devotion to this idea is unnecessary, it's just an abstraction that's useful has stood the test of time, not holy law), but your javascript view code is just as much a part of the presentation as the markup.
In response to a sibling comment, you claim "you dont want to mix the 'structure' of your UI with the behaviour". The fact that your views have a "structure" to begin with is again an artifact of the web's original intention of hosting documents rather than applications. The structure of your view is actually an implementation detail (a concept that's formalized by the Shadow DOM standard in the WebComponents proposal), and separating it out from your view code implies otherwise.