Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : No this.element in can.Component.scope like can.Control?

$
0
0

I don't understand how a separate scope is any better than an integrated scope for unit testing. Easy swapping?
Because you can test Scope object functionality separately, so you don't need a component for that.

  1. The reason I need element references in my scope is for can.batch.start( function(){ /* DOM stuff */ } )
It is very bad Idea to access DOM directly from scope. You can use can.batch though

  1. can.batch.start()
  2. // Do some staff with scope state
  3. can.batch.stop()

Viewing all articles
Browse latest Browse all 3491

Trending Articles