Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions jQuery.printElement/jquery.printElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,19 @@
var elementHtml = _getElementHTMLIncludingFormElements(element);

var html = new Array();

// Copy doctype if it's present
if (document.doctype) {
var node = document.doctype;
html.push(
"<!DOCTYPE "
+ node.name
+ (node.publicId ? ' PUBLIC "' + node.publicId + '"' : '')
+ (!node.publicId && node.systemId ? ' SYSTEM' : '')
+ (node.systemId ? ' "' + node.systemId + '"' : '')
+ '>'
);
}
html.push('<html><head><title>' + opts["pageTitle"] + '</title>');
if (opts["overrideElementCSS"]) {
if (opts["overrideElementCSS"].length > 0) {
Expand Down