function (cb) {
    var componentName;
    var data = this.data;
    var el = this.el;
    var self = this;

    if (data.from !== '') { return false; }

    if (!data.property.startsWith(STRING_COMPONENTS)) { return false; }

    componentName = splitDot(data.property)[1];
    if (el.components[componentName]) { return false; }

    el.addEventListener('componentinitialized', function wait (evt) {
      if (evt.detail.name !== componentName) { return; }
      cb();
      // Since the config was created async, create the animation now since we missed it
      // earlier.
      self.animation = anime(self.config);
      el.removeEventListener('componentinitialized', wait);
    });
    return true;
  }
function (cb) {
    var componentName;
    var data = this.data;
    var el = this.el;
    var self = this;

    if (data.from !== '') { return false; }

    if (!data.property.startsWith(STRING_COMPONENTS)) { return false; }

    componentName = splitDot(data.property)[1];
    if (el.components[componentName]) { return false; }

    el.addEventListener('componentinitialized', function wait (evt) {
      if (evt.detail.name !== componentName) { return; }
      cb();
      // Since the config was created async, create the animation now since we missed it
      // earlier.
      self.animation = anime(self.config);
      el.removeEventListener('componentinitialized', wait);
    });
    return true;
  }
function ( cb ) { var componentName ; var data = this . data ; var el = this . el ; var self = this ; if ( data . from !== '' ) { return false ; } if ( ! data . property . startsWith ( STRING_COMPONENTS ) ) { return false ; } componentName = splitDot ( data . property ) [ 1 ] ; if ( el . components [ componentName ] ) { return false ; } el . addEventListener ( 'componentinitialized' , function wait ( evt ) { if ( evt . detail . name !== componentName ) { return ; } cb ( ) ; // Since the config was created async, create the animation now since we missed it // earlier. self . animation = anime ( self . config ) ; el . removeEventListener ( 'componentinitialized' , wait ) ; } ) ; return true ; }
Wait for component to initialize.
Wait for component to initialize .
Returns true if the component is already initialized