tern
tern copied to clipboard
Polymer(), 'this' not showing any results inside object definition
On the tern demo, first I add Polymer/polymer/polymer.js and Polymer/platform/platform.js as new files. Then I make a blank file with this code:
Polymer('testel', {
prop1: "test",
func1: function () {
this.
}
});
No autocomplete shows up for 'this'. I know this issue has come previously, is there some way to tell tern to always treat the object paramer of the Polymer function as a constructor?
Hi, I have a similar situation, does anyone made any progress with this? I tried to made a defs file with something:
'!name': 'polymer', 'Polymer': { '!type': 'fn(proto: +Polymer.Base) -> +Polymer.Base', 'Base': { 'prototype': { 'set': { '!type': 'fn(path: string, value: ?)', '!doc': 'Convenience method for setting a value to a path and notifying any elements bound to the same path.' }}}}
But still no sucess? Any clue of what to do in this case? Thanks.