Start with an empty but sensible document.body object.

1.0
Ariya Hidayat 2010-12-28 00:05:50 -08:00
parent 1e32c58a77
commit 88d6794065
1 changed files with 3 additions and 0 deletions

View File

@ -149,6 +149,9 @@ Phantom::Phantom(QObject *parent)
m_page.settings()->setAttribute(QWebSettings::LocalStorageEnabled, true);
m_page.settings()->setLocalStoragePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
m_page.settings()->setOfflineStoragePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
// Ensure we have document.body.
m_page.mainFrame()->setHtml("<html><body></body></html>");
}
QStringList Phantom::arguments() const