Constructor
new ComponentParser(optionsopt)
Creates a new ICAL.ComponentParser instance.
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | Component parser options Properties
|
- Source
var options = {
// when false no events will be emitted for type
parseEvent: true,
parseTimezone: true
};
var parser = new ICAL.ComponentParser(options);
parser.onevent(eventComponent) {
//...
}
// ontimezone, etc...
parser.oncomplete = function() {
};
parser.process(stringOrComponent);
Members
parseEvent :Boolean
When true, parse events
- Boolean
- Source
parseTimezone :Boolean
When true, parse timezones
- Boolean
- Source
Methods
process(ical)
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.
Name | Type | Description |
---|---|---|
ical | ICAL. | The component to process, either in its final form, as a jCal Object, or string representation |
- Source
Type Definitions
oncomplete
Fired when parsing is complete
- Source
onerror
Fired if an error occurs during parsing.
- Source
onevent
Fired when a top level component (VEVENT) is found.
- Source
ontimezone
Fired when a top level component (VTIMEZONE) is found
- Source