Hi,
I am learning a little javascript and using Epiphany as the browser on a RPi.
In the book i am using, 'Eloquent Javascript', most examples output with console.log() but I can't see how to see this output in Epiphany.
Is there no console output in Epiphany?
Any ideas?
Thanks,
Shane
-
- Posts: 152
- Joined: Tue Jul 16, 2013 9:41 pm
- Location: St.Gallen, Switzerland/Dublin, Ireland
- Contact: Website
Epiphany Javascript console.log()
Pi = too much fun!
Re: Epiphany Javascript console.log()
>> Is there no console output in Epiphany?
perhaps not you can allwats create the console object and create a log() function in it ...
or create a div and push the log content to that ...
Sorry cant be much help .
perhaps not you can allwats create the console object and create a log() function in it ...
or create a div and push the log content to that ...
Sorry cant be much help .
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
-
- Posts: 152
- Joined: Tue Jul 16, 2013 9:41 pm
- Location: St.Gallen, Switzerland/Dublin, Ireland
- Contact: Website
Re: Epiphany Javascript console.log()
Thanks for your reply. Objects are the next chapter, so this is a little beyond me at the moment.r3d4 wrote:create the console object and create a log() function in it ... or create a div and push the log content to that ...
Should try a different browser?
Thanks,
Shane
Pi = too much fun!
Re: Epiphany Javascript console.log()
Well im no expertofey wrote:Thanks for your reply. Objects are the next chapter, so this is a little beyond me at the moment.r3d4 wrote:create the console object and create a log() function in it ... or create a div and push the log content to that ...
Should try a different browser?
Thanks,
Shane

but i would just skip a head a chaper to read up on objects and or use this
Code: Select all
var console = {} ; // <---- This is an object called console
console.log = function (str) { alert( str ) ; }
// -----
// you can write the above in a diffrent way like
var console = { "log" : function (str){ alert(str) ; } } ;
>> Should try a different browser?
Realy it is up to you , when i was learning js console.log() was not avalable as a 'built in function' of the browser
so you can survive without it if need be , one alternative method would be to just use
Code: Select all
alert('somthing happened') ;
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
- DougieLawson
- Posts: 40594
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Epiphany Javascript console.log()
Firefox with the web developer (on Windows) stuff is going to be much better.ofey wrote: Should try a different browser?
Develop & debug on Windows, deploy on Raspberry Pi.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
-
- Posts: 152
- Joined: Tue Jul 16, 2013 9:41 pm
- Location: St.Gallen, Switzerland/Dublin, Ireland
- Contact: Website
Re: Epiphany Javascript console.log()
Hi,
r3d4 thanks i will just use alert() for the moment.
json.org does have very clear diagrams. Thanks for this.
Shane
r3d4 thanks i will just use alert() for the moment.
json.org does have very clear diagrams. Thanks for this.
Thanks Dougie, I think this the best option.Develop & debug on Windows, deploy on Raspberry Pi.
Shane
Pi = too much fun!
Re: Epiphany Javascript console.log()
DougieLawson wrote: Firefox with the web developer (on Windows) stuff is going to be much better.
Develop & debug on Windows, deploy on Raspberry Pi.
Code: Select all
\r\n
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
-
- Posts: 152
- Joined: Tue Jul 16, 2013 9:41 pm
- Location: St.Gallen, Switzerland/Dublin, Ireland
- Contact: Website
Re: Epiphany Javascript console.log()
and this means it is all the same?\r\n
Like carriage return / newline... probably a techie joke...

Pi = too much fun!
- DougieLawson
- Posts: 40594
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Epiphany Javascript console.log()
I'll see your carriage return & newline and raise your3d4 wrote:Code: Select all
\r\n
Code: Select all
+.;
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
-
- Posts: 152
- Joined: Tue Jul 16, 2013 9:41 pm
- Location: St.Gallen, Switzerland/Dublin, Ireland
- Contact: Website
Re: Epiphany Javascript console.log()
Glad to hear that!DougieLawson wrote:...some kind of poker bidding, ... it doesn't make any sense otherwise.
Pi = too much fun!
Re: Epiphany Javascript console.log()
DougieLawson wrote:I'll see your carriage return & newline and raise your3d4 wrote:Code: Select all
\r\n
I assume it's some kind of poker bidding, because it doesn't make any sense otherwise.Code: Select all
+.;

Its the first thing i can remember about working between windows n other os that wiill trip up any one using default text editors ; that dont display chars you cant see .
Perhaps this is no longer a problem ??
i did not see the OP didnt mention windows ..
>> 'Develop & debug on Windows, deploy on Raspberry Pi.'
to me apperars like pointing some asking for directions the wrongway

Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?
- DougieLawson
- Posts: 40594
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Epiphany Javascript console.log()
The newline vs carriage return/newline is not a problem with Javascript.
If it ever is a problem then dos2unix is the simple tool to undo the \r\n stuff.
If it ever is a problem then dos2unix is the simple tool to undo the \r\n stuff.
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: Epiphany Javascript console.log()
I'm launching epiphany from the command line using SSH using "epiphany-browser -a --profile ~/.config <URL>"
console.log() messages appear in the SSH terminal output
console.log() messages appear in the SSH terminal output
Re: Epiphany Javascript console.log()
True but i would guess that the 'command line' tools ect is a bit further along the 'learning curve' for most who wander in off the web scripting js !DougieLawson wrote:If it ever is a problem then dos2unix is the simple tool to undo the \r\n stuff.
Re: Epiphany Javascript console.log()
I hate to resurrect a dinosaur thread, but in this case I think it's warranted.
This thread turns up in searches about how to enable the JS debugger, so for the help of future JS tinkerers, I'd like to supply the answer:
Open up Terminal, and run Epiphany like so:
Developing and debugging on Windows/Chrome is not always the right answer, since you can very easily fall into traps set by ECMA Script 6 only features which are not supported in Epiphany. IE: Something can work absolutely *fine* on Windows/Chrome but fail in Epiphany 3.8.x on the Pi.
The magic words above will give you a clunky albeit functional debugger for catching any incompatibilities which slip through.
This thread turns up in searches about how to enable the JS debugger, so for the help of future JS tinkerers, I'd like to supply the answer:
Open up Terminal, and run Epiphany like so:
Code: Select all
EPHY_ENABLE_INSPECTOR=true epiphany
The magic words above will give you a clunky albeit functional debugger for catching any incompatibilities which slip through.
Re: Epiphany Javascript console.log()
Thanks!gadgetoid wrote:The magic words above will give you a clunky albeit functional debugger for catching any incompatibilities which slip through.Code: Select all
EPHY_ENABLE_INSPECTOR=true epiphany
(from a current tinkerer)