Don't escape whitespace in console evaluation results. This preserves
the behavior of the old console, and in particular makes pprint() more
useful again.
MozReview-Commit-ID: CrWWXjtSBIw
The new Reps bundle from Bug 1357341 is all about functions now,
so we should remove all unnecessary `createFactory` calls
we used to do when creating Reps.
MozReview-Commit-ID: 4KvCThhwphv
The call to scrollToBottom could take a good amount of time if there were
already logged messages in the console. This might be related to the fact that
componentDidMount is called although there is some layout or paint work.
Delaying the first call to scrollToBottom in the component greatly reduced the
time spent in scrollToBottom.
MozReview-Commit-ID: F3cRYV4OFhm
We were always opening the debugger when clicking on the location link,
which could be wrong since we can have CSS warnings, or logs coming from Scratchpad.
So we add the function to open in StyleEditor and Scratchpad, and copy some mochitests
that where testing the interaction with those links.
MozReview-Commit-ID: 73mQNfy199m
In the MessageBody component, we already have the "mode" props we use
to pass it to the Reps. We only default it to "long" so most of the
message will use it.
We only need to specify to use "short" mode in ConsoleTable cells.
MozReview-Commit-ID: 6KyZkN86bHJ
Add in serviceContainer highlight and unhighlight utils function so they can
be accessible in components.
Fix EvaluationResult component to pass the serviceContainer to the MessageBody.
Modify ElementNodeRep and TextNodeRep to allow passing them function properties
`onDOMNodeMouseOver` and `onDOMNodeMouseOut` that will be called respectively
on mouseOver and mouseOut.
Add a mochitest in the webconsole to make sure we indeed highlight and unhighlight
node as expected, and add tests in Reps to make sure the passed functions get called
as expected.
MozReview-Commit-ID: 8o8WM7vBfMM
Handle the different kind of error objects.
Allow to pass a className to the objectLink component.
Add test to make sure we handle those objects as expected.
MozReview-Commit-ID: IC7ruV9odw1
Add the possibility to pass a style object to StringRep.
Parse the styles strings passed as argument using a dummy node element
to strip off forbidden properties and forbidden values.
Add a mocha test to ensure custom styles are rendered as expected.
MozReview-Commit-ID: I3LgeNRujaL
Fixes the "dispatch is not a function error", passing the dispatch prop from `PageError` to `Message`.
Make the message collapsible only if the message is a group or an error with a stacktrace.
Adds mocha tests.
MozReview-Commit-ID: CkvV2z4yfcV