You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Since console.assert() is defined in Chrome, Safari, and Firebug I wonder if it wouldn't be such a hard sell to get it added. Is there a general policy on how many browsers need to support something before it's added to Tern's default built-ins?
Reviewed. To @peterflynn, low priority, adding "tracking" (not creating a "tern" label yet since it's not clear whether we'll have a lot of these). Peter--I wonder if we should consider just making a pull request directly to Marijn with the addition to the browser.json file?
Also, even if these aren't in tern, we can write .json files for whatever we want and load them into tern. It looks like they are additive, so we can just add the missing methods in, and we wouldn't have to duplicate the entire browser.json file.
Activity
petetronic commentedon Apr 29, 2013
The built-ins are from Tern.JS defs files, with console specifically defined in browser.json.
https://github.com/marijnh/tern/blob/master/defs/browser.json
These appear to be based on the Gecko (Mozilla) documentation, which does not list a console.assert() method.
peterflynn commentedon Apr 30, 2013
Since console.assert() is defined in Chrome, Safari, and Firebug I wonder if it wouldn't be such a hard sell to get it added. Is there a general policy on how many browsers need to support something before it's added to Tern's default built-ins?
njx commentedon May 3, 2013
Reviewed. To @peterflynn, low priority, adding "tracking" (not creating a "tern" label yet since it's not clear whether we'll have a lot of these). Peter--I wonder if we should consider just making a pull request directly to Marijn with the addition to the browser.json file?
petetronic commentedon May 3, 2013
We can always try, doesn't seem unreasonable. I'll ask @dloverin to take a look.
eztierney commentedon May 16, 2013
What about the other console methods that are non-standard, but match between safari, chrome, and firebug? Methods like
console.dir
console.profile
console.group
etc
Do we want hints for all the common methods?
chrome: https://developers.google.com/chrome-developer-tools/docs/console-api#consoleassertexpression_object
firebug: http://getfirebug.com/wiki/index.php/Console_API
safari: https://developer.apple.com/library/safari/#documentation/AppleApplications/Conceptual/Safari_Developer_Guide/DebuggingYourWebsite/DebuggingYourWebsite.html (need to search for Console API, it's near the end)
ie: http://msdn.microsoft.com/en-us/library/ie/hh772183(v=vs.85).aspx
It looks like even ie10 adds 'assert'.
Also, even if these aren't in tern, we can write .json files for whatever we want and load them into tern. It looks like they are additive, so we can just add the missing methods in, and we wouldn't have to duplicate the entire browser.json file.
redmunds commentedon Mar 17, 2014
Was assigned to tern team, so marking "Needs Review".
ficristo commentedon Feb 19, 2017
I see
console.assertandconsole.groupin the hints, but notconsole.profile.I'd say this is fixed.