MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / GetDocumentMode

Method GetDocumentMode

cpp/iedriver/DocumentHost.cpp:309–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309int DocumentHost::GetDocumentMode(IHTMLDocument2* doc) {
310 LOG(TRACE) << "Entering DocumentHost::GetDocumentMode";
311 CComPtr<IHTMLDocument6> mode_doc;
312 doc->QueryInterface<IHTMLDocument6>(&mode_doc);
313 if (!mode_doc) {
314 LOG(DEBUG) << "QueryInterface for IHTMLDocument6 fails, so document mode must be 7 or less.";
315 return 5;
316 }
317 CComVariant mode;
318 HRESULT hr = mode_doc->get_documentMode(&mode);
319 if (FAILED(hr)) {
320 LOGHR(WARN, hr) << "get_documentMode failed.";
321 return 5;
322 }
323 int document_mode = static_cast<int>(mode.fltVal);
324 return document_mode;
325}
326
327bool DocumentHost::IsStandardsMode(IHTMLDocument2* doc) {
328 LOG(TRACE) << "Entering DocumentHost::IsStandardsMode";

Callers

nothing calls this directly

Calls 1

LOGClass · 0.50

Tested by

no test coverage detected