Пример #1
0
        /// <summary>Writes the given html to the end of the document.</summary>
        /// <param name="text">The html to write.</param>
        public void write(string text)
        {
            if (!IsOpen)
            {
                open();
            }

            HtmlElement bd = body;

            if (bd == null)
            {
                // Create an empty document now:
                HtmlElement root = createElement("html") as HtmlElement;
                root.innerHTML = "<head></head><body></body>";
                appendChild(root);
            }

            // Append HTML:
            bd.append(text);
        }