paperwm / gnome-shell-mode

Package for developing gnome-shell extensions
GNU General Public License v2.0
27 stars 7 forks source link

Complete methods of native JS classes (String, Object, etc.) #12

Closed olejorgenb closed 6 years ago

olejorgenb commented 7 years ago

Seems to need special handling. (Array works though)

String.prototype. and Object.prototype. completes using the normal code so there is a simple fix. Functions seems to be harder.

Ideally the fix should be moved upstream to gnome-shell / jsParse.

Might fix itself when/if gjs is updated also?

Frefox's devtools completion code: https://dxr.mozilla.org/mozilla-central/source/devtools/shared/webconsole/js-property-provider.js (getMatchedProps)

olejorgenb commented 6 years ago

The issue is that Object etc. are functions (doh) and is excluded by the typeof(obj) === "object check.