build/ical.js
function(ical) {
      //TODO: this is sync now in the future we will have a incremental parser.
      if (typeof(ical) === 'string') {
        ical = ICAL.parse(ical);
      }

      if (!(ical instanceof ICAL.Component)) {
        ical = new ICAL.Component(ical);
      }

      var components = ical.getAllSubcomponents();
      var i = 0;
      var len = components.length;
      var component;

      for (; i < len; i++) {
        component = components[i];

        switch (component.name) {
          case 'vtimezone':
            if (this.parseTimezone) {
              var tzid = component.getFirstPropertyValue('tzid');
              if (tzid) {
                this.ontimezone(new ICAL.Timezone({
                  tzid: tzid,
                  component: component
                }));
              }
            }
            break;
          case 'vevent':
            if (this.parseEvent) {
              this.onevent(new ICAL.Event(component));
            }
            break;
          default:
            continue;
        }
      }

      //XXX: ideally we should do a "nextTick" here
      //     so in all cases this is actually async.
      this.oncomplete();
    }
function(ical) {
      //TODO: this is sync now in the future we will have a incremental parser.
      if (typeof(ical) === 'string') {
        ical = ICAL.parse(ical);
      }

      if (!(ical instanceof ICAL.Component)) {
        ical = new ICAL.Component(ical);
      }

      var components = ical.getAllSubcomponents();
      var i = 0;
      var len = components.length;
      var component;

      for (; i < len; i++) {
        component = components[i];

        switch (component.name) {
          case 'vtimezone':
            if (this.parseTimezone) {
              var tzid = component.getFirstPropertyValue('tzid');
              if (tzid) {
                this.ontimezone(new ICAL.Timezone({
                  tzid: tzid,
                  component: component
                }));
              }
            }
            break;
          case 'vevent':
            if (this.parseEvent) {
              this.onevent(new ICAL.Event(component));
            }
            break;
          default:
            continue;
        }
      }

      //XXX: ideally we should do a "nextTick" here
      //     so in all cases this is actually async.
      this.oncomplete();
    }
function ( ical ) { //TODO: this is sync now in the future we will have a incremental parser. if ( typeof ( ical ) === 'string' ) { ical = ICAL . parse ( ical ) ; } if ( ! ( ical instanceof ICAL . Component ) ) { ical = new ICAL . Component ( ical ) ; } var components = ical . getAllSubcomponents ( ) ; var i = 0 ; var len = components . length ; var component ; for ( ; i < len ; i ++ ) { component = components [ i ] ; switch ( component . name ) { case 'vtimezone' : if ( this . parseTimezone ) { var tzid = component . getFirstPropertyValue ( 'tzid' ) ; if ( tzid ) { this . ontimezone ( new ICAL . Timezone ( { tzid : tzid , component : component } ) ) ; } } break ; case 'vevent' : if ( this . parseEvent ) { this . onevent ( new ICAL . Event ( component ) ) ; } break ; default : continue ; } } //XXX: ideally we should do a "nextTick" here //     so in all cases this is actually async. this . oncomplete ( ) ; }
Process a string or parse ical object.  This function itself will return
nothing but will start the parsing process.

Events must be registered prior to calling this method.

@param {ICAL.Component|String|Object} ical      The component to process,
either in its final form, as a jCal Object, or string representation
Process a string or parse ical object . This function itself will return nothing but will start the parsing process .