See https://bugs.webkit.org/show_bug.cgi?id=198805. The openDatabase function is allocated by calling JSFunction::createFunctionThatMasqueradesAsUndefined.
Created attachment 380040 [details] test case
The test case produces PASS for me in Safari 13.0.1. PASS: typeof window.openDatabase is undefined
I believe the issue is that (were these both tests) PASS: typeof window.openDatabase is undefined PASS: typeof window.openDatabase is function Both can't be true. Specifically window.openDatabase == "function" is true window.openDatabase == "undefined" is also true http://locutus.sorcerer.co.uk/demo/safari-openDatabase.html
(In reply to Oz from comment #3) > PASS: typeof window.openDatabase is undefined > PASS: typeof window.openDatabase is function > > Both can't be true. Nicely noted, thank you. That discrepancy was made possible due to peephole optimization in BytecodeGenerator::emitEqualityOpImpl(), which detects patterns like `typeof X === "Y"` and emits different bytecodes depending on Y. r265907 fixed the `typeof X === "function"` bytecode op to return `false` for masquerader (aka [[IsHTMLDDA]]) objects. test262 coverage was added in https://github.com/tc39/test262/pull/2706. *** This bug has been marked as a duplicate of bug 215572 ***