/// <summary>Adds an event listener to this document.</summary>
        public void addEventListener(string name, EventListener listener)
        {
            if (Events == null)
            {
                Events = new EventsSet();
            }

            Events.Add(name, listener);
        }
        /// <summary>Adds an event listener to this document.</summary>
        public void addEventListener(string name, EventListener listener, bool useCapture)
        {
            if (Events == null)
            {
                Events = new EventsSet();
            }

            listener.Capture = useCapture;
            Events.Add(name, listener);
        }
 /// <summary>Clears all events on this document.</summary>
 public void ClearEvents()
 {
     Events = null;
 }