Added binding to detect doctype