简体   繁体   中英

How to show documentation string in Firefox / Chrome console?

In IPython I can query the documentation string of a function, class etc. with a question mark <method/class/module>? . For example:

In [1]: sum?
Type:       builtin_function_or_method
String Form:<built-in function sum>
Namespace:  Python builtin
Docstring:
sum(sequence[, start]) -> value

Return the sum of a sequence of numbers (NOT strings) plus the value
of parameter 'start' (which defaults to 0).  When the sequence is
empty, return start.

Do Firefox and/or Chromium consoles offer a similar behavior? If so, how can I query the documentation there?

Update: After the answer of @Aaron I am looking for documentation of the standard library as well as APIs implemented through the browsers.

Note : I checked the Chromium and Firefox documentation, but could not find any indications.

You can print out the names of properties/methods, but you won't get any documentation, especially since websites remove extraneous content (such as comments/documentation) before sending down JavaScript to the client in order to ensure that the JavaScript code is transmitted to the user as quickly as possible.

As an example of seeing what there is in terms of properties, if you type "Array.prototype." in the Chrome developer console, you will see that it autocompletes with the available methods.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM