试图获取可用的JavaScript函数/方法列表 [英] Trying to get a list of available JavaScript functions/methods

查看:40
本文介绍了试图获取可用的JavaScript函数/方法列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试在脚本中获取JavaScript方法/函数列表

文件与一个优秀的文本编辑器相同,差异是

,我需要将其输出到文件或标准输出,或其他一些方式

get it it自动。我不会挑剔我使用的语言,无论是JavaScript还是其他什么语言。有人有任何想法吗?我已经尝试使用Exuberant Ctags,但这似乎不适用于非常先进的

脚本,如Ext。


我猜测最好的方法是进行某种审讯

的HTMLScriptElement或其他东西,但是我看不出如何得到一个

简单从中可以看出函数/方法的列表。


或者,任何用于解析JS的C库都可能是一个好主意,甚至包括:
Python,Perl,PHP,等等真的,有人有任何建议吗?


干杯


Garry

Hi all,
I''m trying to get list of JavaScript methods/functions in a script
file in much the same a good text editor will, the difference being
that I need to output it to a file or stdout, or some other way of
"getting at it" automatically. I''m not fussy about what language I
use, be it JavaScript or something else. Anyone got any ideas? I''ve
tried Exuberant Ctags, but that does not seem to work on very advanced
scripts like Ext.

I''m guessing the best way would be to have some kind of interrogation
of a HTMLScriptElement or something, but I can''t see how to get a
simple list of functions/methods from that.

Alternatively, any C library for parsing JS might be a good idea, even
Python, Perl, PHP, whatever really, anyone got any recommendations?

Cheers

Garry

推荐答案

thegman写道:
thegman wrote:

我正在尝试获取脚本中的JavaScript方法/函数列表

file in many同样是一个好的文本编辑器,区别在于我需要将它输出到文件或标准输出,或者其他一些方式

得到它。自动。
I''m trying to get list of JavaScript methods/functions in a script
file in much the same a good text editor will, the difference being
that I need to output it to a file or stdout, or some other way of
"getting at it" automatically.



你这是第1337位提出这个问题的人。在你打扰其他人解决问题之前要小心吗?


http://jibbering.com/faq/

PointedEars

-

任何打过这个页面最好用浏览器X查看的人都会在

a上看到网页似乎渴望过去的糟糕时光,在网络之前,

当你几乎没有机会阅读另一台计算机,另一台文字处理器或其他网络上的文件。 - Tim Berners-Lee

You are about the 1337th person to ask that question here. Care to do
a *little* research before you bother other people with your problems?

http://jibbering.com/faq/
PointedEars
--
Anyone who slaps a ''this page is best viewed with Browser X'' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee


5月10日下午3:30 *,Thomas''PointedEars''Lahn< PointedE ... @ web.de>

写道:
On May 10, 3:30*pm, Thomas ''PointedEars'' Lahn <PointedE...@web.de>
wrote:

thegman写道:
thegman wrote:

我正在尝试获取脚本中的JavaScript方法/函数列表

文件与良好的文本编辑器相同,区别在于我需要将其输出到文件或stdout,或其他一些方式

get it it自动。
I''m trying to get list of JavaScript methods/functions in a script
file in much the same a good text editor will, the difference being
that I need to output it to a file or stdout, or some other way of
"getting at it" automatically.



你是第1337位在这里提出这个问题的人。 *在你打扰其他人解决问题之前要小心吗?

a * little * research?

http://jibbering.com/faq/

PointedEars

-

任何拍下这个页面的人最好用浏览器X查看标签

a网页似乎渴望过去的糟糕时光,在网络之前,

,当你几乎没有机会阅读另一台计算机,另一台文字处理器或其他网络上的文件。 - Tim Berners-Lee


You are about the 1337th person to ask that question here. *Care to do
a *little* research before you bother other people with your problems?

http://jibbering.com/faq/

PointedEars
--
Anyone who slaps a ''this page is best viewed with Browser X'' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee



我已经看了很多,也许我是

中最糟糕的Google员工世界或某事,但我找不到我要找的东西,如果

某人有一些链接,我会很感激。

谢谢


Garry


I''ve looked around quite a lot, maybe I''m the worst Googler in the
world or something, but I can''t find what I''m looking for, if
someone''s got some links, I''d appreciate it.

Thanks

Garry


thegman写道:
thegman wrote:

[...] Thomas''PointedEars''Lahn [...]写道:
[...] Thomas ''PointedEars'' Lahn [...] wrote:

> thegman写道:
>thegman wrote:

>>我正在尝试在一个好的文本编辑器中获取脚本
文件中的JavaScript方法/函数列表,区别在于
我需要将它输出到文件或标准输出,或其他一些方式来获取它。自动。
>>I''m trying to get list of JavaScript methods/functions in a script
file in much the same a good text editor will, the difference being
that I need to output it to a file or stdout, or some other way of
"getting at it" automatically.


你是第1337位在这里提出这个问题的人。在你打扰其他人解决你的问题之前要小心做一点*研究吗?

http://jibbering.com/faq/
[...]

You are about the 1337th person to ask that question here. Care to do
a *little* research before you bother other people with your problems?

http://jibbering.com/faq/
[...]



Please修改你的报价也是常见问题解答说明。

Please trim your quotes as also recommended by the FAQ Notes.


我已经看了很多,也许我是

世界或其他东西,但我找不到我要找的东西,如果

某人有一些链接,我会很感激。
I''ve looked around quite a lot, maybe I''m the worst Googler in the
world or something, but I can''t find what I''m looking for, if
someone''s got some links, I''d appreciate it.

http://groups.google.com/groups?as_u...ing=d&filter=0

PointedEars

-

Prototype.js是由那些不懂javascript的人写的

谁不懂javascript。不知道javascript的人不是设计使用javascript的系统的最佳建议来源。

- Richard Cornford,cljs,< f8 ** *****************@news.demon.co.uk>

http://groups.google.com/groups?as_u...ing=d&filter=0
PointedEars
--
Prototype.js was written by people who don''t know javascript for people
who don''t know javascript. People who don''t know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>


这篇关于试图获取可用的JavaScript函数/方法列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆