accessibility.js |
Helper function that determines if nsIAccessible object is in defunct state.
@param {nsIAccessible} accessible
object to be tested.
@return {Boolean}
True if accessible object is defunct, false otherwise.
|
2848 |
actor-registry.js |
Register a CommonJS module with the devtools server.
@param id string
The ID of a CommonJS module.
The actor is going to be registered immediately, but loaded only
when a client starts sending packets to an actor with the same id.
@param options object
An object with 3 mandatory attributes:
- prefix (string):
The prefix of an actor is used to compute:
- the `actorID` of each new actor instance (ex: prefix1). (See Pool.manage)
- the actor name in the listTabs request. Sending a listTabs
request to the root actor returns actor IDs. IDs are in
dictionaries, with actor names as keys and actor IDs as values.
The actor name is the prefix to which the "Actor" string is
appended. So for an actor with the `console` prefix, the actor
name will be `consoleActor`.
- constructor (string):
the name of the exported symbol to be used as the actor
constructor.
- type (a dictionary of booleans with following attribute names):
- "global"
registers a global actor instance, if true.
A global actor has the root actor as its parent.
- "target"
registers a target-scoped actor instance, if true.
A new actor will be created for each target, such as a tab.
|
13669 |
breakpoint-actor-map.js |
A BreakpointActorMap is a map from locations to instances of BreakpointActor.
|
2009 |
capture-screenshot.js |
This function is called to simulate camera effects
@param {BrowsingContext} browsingContext: The browsing context associated with the
browser element we want to animate.
|
7095 |
css-grid-utils.js |
Returns the grid fragment array with all the grid fragment data stringifiable.
@param {Object} fragments
Grid fragment object.
@return {Array} representation with the grid fragment data stringifiable.
|
1606 |
custom-formatters.js |
Handle a protocol request to get the custom formatter header for an object.
This is typically returned into ObjectActor's form if custom formatters are enabled.
@param {ObjectActor} objectActor
@returns {Object} Data related to the custom formatter header:
- {boolean} useCustomFormatter, indicating if a custom formatter is used.
- {Array} header JsonML of the output header.
- {boolean} hasBody True in case the custom formatter has a body.
- {Object} formatter The devtoolsFormatters item that was being used to format
the object.
|
16847 |
dbg-source.js |
Get the source text offset equivalent to a given line/column pair.
@param {Debugger.Source} source
@param {number} line The 1-based line number.
@param {number} column The 0-based column number.
@returns {number} The codepoint offset into the source's text.
|
3040 |
event-breakpoints.js |
@param {String} groupID
@param {String} eventType
@param {Function} condition: Optional function that takes a Window as parameter. When
passed, the event will only be included if the result of the function
call is `true` (See `getAvailableEventBreakpoints`).
@returns {Object}
|
14500 |
event-loop.js |
An object that represents a nested event loop. It is used as the nest
requestor with nsIJSInspector instances.
@param ThreadActor thread
The thread actor that is creating this nested event loop.
|
7864 |
inactive-property-helper.js |
A list of rules for when CSS properties have no effect.
In certain situations, CSS properties do not have any effect. A common
example is trying to set a width on an inline element like a <span>.
There are so many properties in CSS that it's difficult to remember which
ones do and don't apply in certain situations. Some are straight-forward
like `flex-wrap` only applying to an element that has `display:flex`.
Others are less trivial like setting something other than a color on a
`:visited` pseudo-class.
This file contains "rules" in the form of objects with the following
properties:
{
invalidProperties:
Array of CSS property names that are inactive if the rule matches.
when:
The rule itself, a JS function used to identify the conditions
indicating whether a property is valid or not.
fixId:
A Fluent id containing a suggested solution to the problem that is
causing a property to be inactive.
msgId:
A Fluent id containing an error message explaining why a property is
inactive in this situation.
}
If you add a new rule, also add a test for it in:
server/tests/chrome/test_inspector-inactive-property-helper.html
The main export is `isPropertyUsed()`, which can be used to check if a
property is used or not, and why.
NOTE: We should generally *not* add rules here for any CSS properties that
inherit by default, because it's hard for us to know whether such
properties are truly "inactive". Web developers might legitimately set
such a property on any arbitrary element, in order to concisely establish
the default property-value throughout that element's subtree. For example,
consider the "list-style-*" properties, which inherit by default and which
only have a rendering effect on elements with "display:list-item"
(e.g. <li>). It might superficially seem like we could add a rule here to
warn about usages of these properties on non-"list-item" elements, but we
shouldn't actually warn about that. A web developer may legitimately
prefer to set these properties on an arbitrary container element (e.g. an
<ol> element, or even the <html> element) in order to concisely adjust the
rendering of a whole list (or all the lists in a document).
|
34985 |
logEvent.js |
|
3088 |
make-debugger.js |
Multiple actors that use a |Debugger| instance come in a few versions, each
with a different set of debuggees. One version for content tabs (globals
within a tab), one version for chrome debugging (all globals), and sometimes
a third version for addon debugging (chrome globals the addon is loaded in
and content globals the addon injects scripts into). The |makeDebugger|
function helps us avoid repeating the logic for finding and maintaining the
correct set of globals for a given |Debugger| instance across each version of
all of our actors.
The |makeDebugger| function expects a single object parameter with the
following properties:
@param Function findDebuggees
Called with one argument: a |Debugger| instance. This function should
return an iterable of globals to be added to the |Debugger|
instance. The globals may be wrapped in a |Debugger.Object|, or
unwrapped.
@param Function shouldAddNewGlobalAsDebuggee
Called with one argument: a |Debugger.Object| wrapping a global
object. This function must return |true| if the global object should
be added as debuggee, and |false| otherwise.
@returns Debugger
Returns a |Debugger| instance that can manage its set of debuggee
globals itself and is decorated with the |EventEmitter| class.
Existing |Debugger| properties set on the returned |Debugger|
instance:
- onNewGlobalObject: The |Debugger| will automatically add new
globals as debuggees if calling |shouldAddNewGlobalAsDebuggee|
with the global returns true.
- uncaughtExceptionHook: The |Debugger| already has an error
reporter attached to |uncaughtExceptionHook|, so if any
|Debugger| hooks fail, the error will be reported.
New properties set on the returned |Debugger| instance:
- addDebuggees: A function which takes no arguments. It adds all
current globals that should be debuggees (as determined by
|findDebuggees|) to the |Debugger| instance.
|
4337 |
moz.build |
|
890 |
shapes-utils.js |
Get the distance between two points on a plane.
@param {Number} x1 the x coord of the first point
@param {Number} y1 the y coord of the first point
@param {Number} x2 the x coord of the second point
@param {Number} y2 the y coord of the second point
@returns {Number} the distance between the two points
|
5813 |
source-map-utils.js |
|
1446 |
source-url.js |
Debugger.Source objects have a `url` property that exposes the value
that was passed to SpiderMonkey, but unfortunately often SpiderMonkey
sets a URL even in cases where it doesn't make sense, so we have to
explicitly ignore the URL value in these contexts to keep things a bit
more consistent.
@param {Debugger.Source} source
@return {string | null}
|
1523 |
sources-manager.js |
Matches strings of the form "foo.min.js" or "foo-min.js", etc. If the regular
expression matches, we can be fairly sure that the source is minified, and
treat it as such.
|
14716 |
stack.js |
A helper class that stores stack frame objects. Each frame is
assigned an index, and if a frame is added more than once, the same
index is used. Users of the class can get an array of all frames
that have been added.
|
5394 |
style-utils.js |
Helper function for getting an image preview of the given font.
@param font {string}
Name of font to preview
@param doc {Document}
Document to use to render font
@param options {object}
Object with options 'previewText' and 'previewFontSize'
@return dataUrl
The data URI of the font preview image
|
6743 |
stylesheet-utils.js |
For imported stylesheets, `ownerNode` is null.
To resolve the ownerNode for an imported stylesheet, loop on `parentStylesheet`
until we reach the topmost stylesheet, which should have a valid ownerNode.
Constructable stylesheets do not have an owner node and this method will
return null.
@param {StyleSheet}
The stylesheet for which we want to retrieve the ownerNode.
@return {DOMNode|null} The ownerNode or null for constructable stylesheets.
|
4334 |
stylesheets-manager.js |
Manage stylesheets related to a given Target Actor.
@emits applicable-stylesheet-added: emitted when an applicable stylesheet is added to the document.
First arg is an object with the following properties:
- resourceId {String}: The id that was assigned to the stylesheet
- styleSheet {StyleSheet}: The actual stylesheet
- creationData {Object}: An object with:
- isCreatedByDevTools {Boolean}: Was the stylesheet created by DevTools (e.g.
by the user clicking the new stylesheet button in the styleeditor)
- fileName {String}
@emits stylesheet-updated: emitted when there was changes in a stylesheet
First arg is an object with the following properties:
- resourceId {String}: The id that was assigned to the stylesheet
- updateKind {String}: Which kind of update it is ("style-applied",
"at-rules-changed", "matches-change", "property-change")
- updates {Object}: The update data
|
27287 |
track-change-emitter.js |
A helper class that is listened to by the ChangesActor, and can be
used to send changes to the ChangesActor.
|
583 |
walker-search.js |
The walker-search module provides a simple API to index and search strings
and elements inside a given document.
It indexes tag names, attribute names and values, and text contents.
It provides a simple search function that returns a list of nodes that
matched.
|
9324 |
watchpoint-map.js |
|
4404 |