public GeckoElement CreateElement(string tagName)
        {
            if (string.IsNullOrEmpty(tagName))
            {
                throw new ArgumentException("tagName");
            }

            return(GeckoElement.CreateDomElementWrapper(Window, Doc.Value.CreateElement(tagName)));
        }
示例#2
0
        public GeckoElement CreateElement(string tagName)
        {
            if (string.IsNullOrEmpty(tagName))
            {
                throw new ArgumentException("tagName");
            }

            var nativeElement = nsString.Pass <nsIDOMElement>(_domDocument.CreateElement, tagName);

            return(GeckoElement.CreateDomElementWrapper(nativeElement));
        }
示例#3
0
        /// <summary>
        /// Searches for and returns the element in the document with the given id.
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Found element or null if element does not exist</returns>
        public GeckoElement GetElementById(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return(null);
            }

            var native = nsString.Pass <nsIDOMElement>(_domDocument.GetElementById, id);

            return(GeckoElement.CreateDomElementWrapper((nsIDOMElement)native));
        }