A javascript method/stack tracer for browsers? [closed] - javascript

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
To help debugging a huge web application involving a lot of javascript calls, I would like to be able to trace all these JS calls automatically, to generate a kind of stacktrace (as a tree for example) for all calls, through a plug-in for web browser.
Of course all browsers include a great javascript debugger, but its "stacktrace" tab usually only give current stacktrace for an active breakpoint.
My goal is to don't have to put any breakpoint : simply load the page, run actions, and then retrieve the list of method invocations as a tree, and so.
Also, I DO NOT want to modify the source itself to include in it some profiling/tracing features.
Firefox is my favorite browser, but Chrome may be suitable too for this purpose.
Previously there were an addon to FF to do almost this, fireflow, but since a few FF releases it's not working anymore and it will be likely not be fixed (because it uses a deprecated lib removed in last FF).
I didn't find any replacement solution, or StackExchange topic about a such solution.

You could use flame charts of the Chrome Developer Tools:
http://addyosmani.com/blog/devtools-flame-charts/

You might be able to implement some sort of debug output using ES6 proxies, see: http://www.2ality.com/2014/12/es6-proxies.html .. around section "2.4 Forwarding Operations".

Related

Why does iMacros only support javascript files on Palemoon or lower version of FireFox? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
The title explains my question. for context: I made a javascript file for iMacros but it only works for Palemoon and lower versions of Firefox. Is there any possible way to get around this without downgrading Firefox? I don't want to use Palemoon all the time.
I've already answered your Qt many times on the iMacros Forum, here and here for example to only mention 2 recent Threads from the last few months from a quick Check...
And otherwise, convert your '.js' Script (back) to pure '.iim'... You can do "everything" in pure '.iim', I've never used a '.js' Script myself, while being an "Advanced" User...
And '.iim' Scripts will work in all Versions of iMacros and all 4 Browsers supported by iMacros, without relying on '.js' Script Support...

HTMLElement.scroll() function browser compatability [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Where can I find browser compatability information for the HTMLElement.scroll() function? I've looked on caniuse.com as well as the Mozilla Developer Network, but I was unable to find any information on the scroll function.
It doesn't exist and yet it is there in Chrome, inherited from the Element class (not HTMLElement in Chrome).
I dug through all references and nobody is willing to admit to its existence except here:
https://webplatform.github.io/docs/html/attributes/scroll/
It is a throwback to IE6. Presumably still unofficially supported for backwards compatibility?
Whilst that page describes its purpose with regard to the HTML or BODY elements, I actually arrived at that page from this one which listed it as a method of HTMLElement:
https://webplatform.github.io/docs/dom/HTMLElement/
Recommendation: DO NOT USE!
That would be because it does not exist.
You've got all sorts of other options, such as scrollTop(), scrollIntoView(), scrollLeft() etc.... But plain old scroll() does not exit.
A function named scroll() would be ambiguous. What would it do?
The Element.scroll is added as an extension to Element by the CSSOM view module specification (https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface). Browsers haven't been very fast in adopting everything from the CSSOM specification, so i would be careful using it. However in my opinion it should be in same level of support as Element. scrollIntoView which is another extension proposed by the CSSOM specification, for which you can find support info here https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#Browser_compatibility

Node.js drawing on screen [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've been looking all over the internet for this. I'd like to know if there is any Node.js packages/bindigs/libraries that allow you to make an application that draws on the screen without node-webkit(NW.js)/Electron or other implementations based on browsers. Maybe something that binds to opengl with support for 2D graphics?
Let me know if you know some names or links. If not I might have to write something myself.
Thank you guys.
There is an experimental project : https://github.com/creationix/node-sdl
This basically provides bindings to the SDL library:
Simple DirectMedia Layer is a cross-platform development library
designed to provide low level access to audio, keyboard, mouse,
joystick, and graphics hardware via OpenGL and Direct3D.
If you can get it compiled, you can try the example scripts in nodejs.
node-opencv or OpenCV in general should allow you this. At least it has a HighGUI class, which gives you native window contexts to display image data. With a lot of hacking you can build something you require. But I would suggest using browser contexts and HTMLCanvas anyhow. It gives you all you need out of the box. You just need to set it up properly.
Edit:
As per #Zorgatone's suggestion, GTK could be a very good library for that purpose, though node bindings are very stale.
There are projects that brings
QT bindings to node.js - https://github.com/arturadib/node-qt
GTK bindings - https://github.com/Tim-Smart/node-gtk
WxWidgets bindings - https://github.com/joeferner/wxNode
but unfortunately the last commits seem to be for old node.js versions.
It will be substantial work to make the bindings work with a recent version of node but those a interesting starting points.
V8-GL intends to provide bindings for creating 2D-3D graphics on the desktop with javascript.The Status is not completed yet, but maybe it is enough for what you are trying to do https://github.com/philogb/V8-GL
Another thing i just found out is, that it actually uses immediate mode, which is deprecated but still works.

How to take screenshot of a webpage after running javascript [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have a webpage which renders LaTeX formula using javascript. I wish to take a screenshot of it programmatically after running the scripts. Is this possible?
There is a cross platform, HTML5 solution, works with latest browsers only http://html2canvas.hertzen.com/
The script should work fine on the following browsers:
Firefox 3.5+
Google Chrome Newer versions of Opera
IE9 (Older versions compatible with the use of flashcanvas)
Demo: http://html2canvas.hertzen.com/screenshots.html
You can use webkit2png and apply the delay option to wait for JS to finish rendering the formulae before taking the screenshot.
You can use a headless browser like PhantomJS to render LaTeX / MathJax.
Related How can I force PhantomJS to wait until MathJax is finished?

Webkit JavaScript Reference [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
For Gecko there's Mozilla Developer Network
For IE there's MSDN.
For webkit there's...Apple Developer Connection?
There are a couple of JavaScript related documents on ADC, but nothing as comprehensive as MDN or MSDN. There's no reference. There's no way to look up methods of arrays or strings for webkit, or anything is there? So what, do we just assume it's the same as Gecko? IE?
How about the WebKit DOM Reference?
http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/WebKitDOMRef/index.html
Update
Thanks for the comments - yes this now redirects.
Perhaps as others have said, one of the other browsers' references would be a good place to start - then for Safari's own DOM extensions/additions, there's the 'Safari DOM Additions Reference':
https://developer.apple.com/documentation/webkitjs
Otherwise it looks like it would be a case of finding your way through the confusing set of documents there in the Safari Developer Library:
http://developer.apple.com/library/safari/navigation/
I use quirksmode.org for all my JavaScript needs. MDC is my resource for references and basic how-tos and quirksmode to show me that I, in fact, cannot even use it in IE. WebKit and Gecko seem to behave similarly enough when it comes to JavaScript anyway.
But other than what you listed, I have never come across anything specific to WebKit.
I am not aware of a WebKit JavaScript reference like MDN or MSDN. When I need to look something up, I use the Mozilla Developer Network, as Gecko and WebKit seem to be heading in roughly the same direction.
Steve

Categories