Ejemplo n.º 1
0
        public Document(IHtmlSerializerFactory serializerFactory, string typeValue)
        {
            this.serializerFactory = serializerFactory;
            TypeValue = typeValue;
            var html = default(Element <Html, IElement>);

            html = new Element <Html, IElement>(this, html, null, serializerFactory);
            Html = html;
            Head = html.AddChild(x => x.Head);
            Body = html.AddChild(x => x.Body);
        }
Ejemplo n.º 2
0
        public Document(IHtmlSerializerFactory serializerFactory, DocumentType documentType = DocumentType.Html5)
        {
            this.serializerFactory = serializerFactory;
            TypeValue = documentType.GetDescription();
            var html = default(Element <Html, IElement>);

            html = new Element <Html, IElement>(this, html, null, serializerFactory);
            Html = html;
            Head = html.AddChild(x => x.Head);
            Body = html.AddChild(x => x.Body);
        }