tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RequestListColumnMethod.js (943B)


      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/. */
      4 
      5 "use strict";
      6 
      7 const {
      8  Component,
      9 } = require("resource://devtools/client/shared/vendor/react.mjs");
     10 const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
     11 const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.mjs");
     12 
     13 class RequestListColumnMethod extends Component {
     14  static get propTypes() {
     15    return {
     16      item: PropTypes.object.isRequired,
     17    };
     18  }
     19 
     20  shouldComponentUpdate(nextProps) {
     21    return this.props.item.method !== nextProps.item.method;
     22  }
     23 
     24  render() {
     25    const { method } = this.props.item;
     26    return dom.td(
     27      { className: "requests-list-column requests-list-method" },
     28      method
     29    );
     30  }
     31 }
     32 
     33 module.exports = RequestListColumnMethod;