-r / --run command-line option produces no output

Bug #875318 reported by gue5t gue5t
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Midori Web Browser
Fix Released
Undecided
Unassigned

Bug Description

The --run command-line option runs javascript from files, but I can't seem to manage to cause it to actually have any noticeable effect when run on well-formed javascript input. It does print exceptions in the case of errors in js execution.

Am I not understanding the purpose of this feature, or is there currently no way to see the result of js execution via --run?

Tags: javascript
Revision history for this message
Cris Dywan (kalikiana) wrote :

I would expect console.info () to be available and print to console. Though I haven't use the feature myself in a while and if no active developer tests features - as you are doing now - they tend to break unnoticed.

The way forward as I see it is one of the following:

a) Remove the feature entirely.
b) Implement console.info ().
c) Provide a full-blown web view to run the script code, so window.document and friends work.
d) A full-blown web view, with window.document and window.open support.
e) A full-blown web view with .document, .open and modifying window features and size.
f) Provide a full-blown web view OR apply to an existing instance if available.

I think option d) is kinda neat, you could run web applications in JS. e) would be a small enhancement on top of that and could be added later as well. I'm pondering to hack it up quickly to see how it fares.

Changed in midori:
status: New → Opinion
Revision history for this message
Cris Dywan (kalikiana) wrote :

So I reworked --run on top of --app. The given script is executed in a hidden browser. The window is shown once and hidden immediately to avoid assertions when a window is created from a script. It could use some investigation into a more elegant solution, but it seems to work well for now. Console messages are printed on the console.
This is basically option d).

Changed in midori:
status: Opinion → Fix Committed
Cris Dywan (kalikiana)
Changed in midori:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.