- " for (var name in object)\n"
- " if (name.substring(0, entire) == prefix)\n"
- " names.push(name.substr(before));\n"
+ " if (false) {\n"
+ " for (var name in object)\n"
+ " if (name.substring(0, entire) == prefix)\n"
+ " names.push(name.substr(before));\n"
+ " } else do {\n"
+ " if (object.hasOwnProperty(\"cy$complete\")) {\n"
+ " names = names.concat(object.cy$complete(prefix));\n"
+ " continue;\n"
+ " }\n"
+ " try {\n"
+ " var local = Object.getOwnPropertyNames(object);\n"
+ " } catch (e) {\n"
+ " continue;\n"
+ " }\n"
+ " for (var name of local)\n"
+ " if (name.substring(0, entire) == prefix)\n"
+ " names.push(name.substr(before));\n"
+ " } while (object = typeof object === 'object' ? Object.getPrototypeOf(object) : object.__proto__);\n"