/// <summary>
        /// Determines whether an element is excluded from a form data set.
        /// </summary>
        /// <param name="form"></param>
        /// <param name="e"></param>
        /// <param name="submitter"></param>
        /// <returns></returns>
        private static bool IsExcludedFromDataSet(IHTMLFormElement form, IDomElement e, IDomElement submitter)
        {
            var submittable = e as IFormSubmittableElement;
            if (submittable == null || submittable.Form != form)
            {
                return true;
            }

            return (e.GetAncestors().Any(a => a.NodeName == "DATALIST")) ||
                   (e.Disabled) ||
                   (IsButton(e) && e != submitter) ||
                   (e is IHTMLInputElement && e.Type == "checkbox" && !e.Checked) ||
                   (e is IHTMLInputElement && e.Type == "radio" && !e.Checked) ||
                   (e.Name.IsNullOrEmpty() && !(e is IHTMLInputElement && e.Type == "image")) ||
                   (e.NodeName == "OBJECT");
        }