1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
11 UPDATE_HISTORY_POSITION
,
12 REVERSE_SEARCH_INPUT_CHANGE
,
15 } = require("resource://devtools/client/webconsole/constants.js");
18 * Append a new value in the history of executed expressions,
19 * or overwrite the most recent entry. The most recent entry may
20 * contain the last edited input value that was not evaluated yet.
22 function appendToHistory(expression
) {
24 type
: APPEND_TO_HISTORY
,
30 * Clear the console history altogether. Note that this will not affect
31 * other consoles that are already opened (since they have their own copy),
32 * but it will reset the array for all newly-opened consoles.
34 function clearHistory() {
41 * Fired when the console history from previous Firefox sessions is loaded.
43 function historyLoaded(entries
) {
51 * Update place-holder position in the history list.
53 function updateHistoryPosition(direction
, expression
) {
55 type
: UPDATE_HISTORY_POSITION
,
61 function reverseSearchInputChange(value
) {
63 type
: REVERSE_SEARCH_INPUT_CHANGE
,
68 function showReverseSearchNext({ access
} = {}) {
70 type
: REVERSE_SEARCH_NEXT
,
75 function showReverseSearchBack({ access
} = {}) {
77 type
: REVERSE_SEARCH_BACK
,
86 updateHistoryPosition
,
87 reverseSearchInputChange
,
88 showReverseSearchNext
,
89 showReverseSearchBack
,