
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 10:13 AM
If I execute console.log() in a background script I get a javascript error (console is not defined). But in a widget server script, the message appears in the Chrome console. What's up with that?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:06 AM
ServiceNow realized console.log is a common javascript function that is used by angularjs and incorporated the functionality of console.log in the widget server script to print in the browser's console.
when they developed background scripts application - the thought of implementing console.log might never cross their minds as they implemented gs.log and printing something in the browser's console doesn't add any value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:06 AM
ServiceNow realized console.log is a common javascript function that is used by angularjs and incorporated the functionality of console.log in the widget server script to print in the browser's console.
when they developed background scripts application - the thought of implementing console.log might never cross their minds as they implemented gs.log and printing something in the browser's console doesn't add any value.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2021 04:06 PM
"printing something in the browser's console doesn't add any value"
Well, how do I use gs.log to log an object in a way that I can navigate it the way console.log does?
This is one of my current learning pains; it's so easy to inspect objects with console.log, but now I need to find a server-side alternative for my server-side scripts.
What would you all suggest, please? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-07-2021 04:26 PM