@@ -30,6 +30,7 @@ var canLog = require('can-log');
30
30
var canDev = require ( 'can-log/dev/dev' ) ;
31
31
var assign = require ( 'can-assign' ) ;
32
32
var ObservationRecorder = require ( "can-observation-recorder" ) ;
33
+ var queues = require ( "can-queues" ) ;
33
34
require ( 'can-view-model' ) ;
34
35
35
36
// DefineList must be imported so Arrays on the ViewModel
@@ -330,14 +331,28 @@ var Component = Construct.extend(
330
331
this . renderer = stache ( viewName , this . renderer ) ;
331
332
}
332
333
333
- // Register this component to be created when its `tag` is found.
334
- viewCallbacks . tag ( this . prototype . tag , function ( el , tagData ) {
334
+ var renderComponent = function ( el , tagData ) {
335
335
// Check if a symbol already exists on the element; if it does, then
336
336
// a new instance of the component has already been created
337
337
if ( el [ createdByCanComponentSymbol ] === undefined ) {
338
338
new self ( el , tagData ) ;
339
339
}
340
- } ) ;
340
+ } ;
341
+
342
+ //!steal-remove-start
343
+ if ( process . env . NODE_ENV !== 'production' ) {
344
+ Object . defineProperty ( renderComponent , "name" , {
345
+ value : "render <" + this . prototype . tag + ">" ,
346
+ configurable : true
347
+ } ) ;
348
+ renderComponent = queues . runAsTask ( renderComponent , function ( el , tagData ) {
349
+ return [ "Rendering" , el , "with" , tagData . scope ] ;
350
+ } ) ;
351
+ }
352
+ //!steal-remove-end
353
+
354
+ // Register this component to be created when its `tag` is found.
355
+ viewCallbacks . tag ( this . prototype . tag , renderComponent ) ;
341
356
}
342
357
}
343
358
} , {
0 commit comments