public static void SetQuirksMode(this DomDocument self, QuirksMode value) { self.RemoveAnnotations <QuirksModeAnnotation>(); if (value != QuirksMode.None) { self.AddAnnotation(new QuirksModeAnnotation(value)); } }