Bug 1260283 - Implement new console output frontend behind a pref. r=bgrins

MozReview-Commit-ID: 54Tl5b5T2EJ
This commit is contained in:
Lin Clark
2016-04-29 13:16:00 -07:00
parent 09f5fd7538
commit 404f48a5f9
30 changed files with 993 additions and 37 deletions

View File

@@ -0,0 +1,33 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const React = require("devtools/client/shared/vendor/react");
const { connect } = require("devtools/client/shared/vendor/react-redux");
const DOM = React.DOM;
const MessageContainer = React.createFactory(require("devtools/client/webconsole/new-console-output/components/message-container").MessageContainer);
const ConsoleOutput = React.createClass({
displayName: "ConsoleOutput",
render() {
let messageNodes = this.props.messages.map(function(message) {
return (
MessageContainer({ message })
);
});
return (
DOM.div({}, messageNodes)
);
}
});
const mapStateToProps = (state) => {
return {
messages: state.messages
};
};
module.exports = connect(mapStateToProps)(ConsoleOutput);