| Index: third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js b/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
|
| index 3e44bcdaee5ca6c768bc7dc18e5960a1d0c5ceee..7e0a7d137c591e7a8cce3078a92ae819c0103804 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/network/RequestHTMLView.js
|
| @@ -27,41 +27,41 @@
|
| * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
| -
|
| /**
|
| - * @constructor
|
| - * @extends {WebInspector.RequestView}
|
| - * @param {!WebInspector.NetworkRequest} request
|
| - * @param {string} dataURL
|
| + * @unrestricted
|
| */
|
| -WebInspector.RequestHTMLView = function(request, dataURL)
|
| -{
|
| - WebInspector.RequestView.call(this, request);
|
| +WebInspector.RequestHTMLView = class extends WebInspector.RequestView {
|
| + /**
|
| + * @param {!WebInspector.NetworkRequest} request
|
| + * @param {string} dataURL
|
| + */
|
| + constructor(request, dataURL) {
|
| + super(request);
|
| this._dataURL = dataURL;
|
| - this.element.classList.add("html");
|
| -};
|
| -
|
| -WebInspector.RequestHTMLView.prototype = {
|
| - wasShown: function()
|
| - {
|
| - this._createIFrame();
|
| - },
|
| + this.element.classList.add('html');
|
| + }
|
|
|
| - willHide: function(parentElement)
|
| - {
|
| - this.element.removeChildren();
|
| - },
|
| + /**
|
| + * @override
|
| + */
|
| + wasShown() {
|
| + this._createIFrame();
|
| + }
|
|
|
| - _createIFrame: function()
|
| - {
|
| - // We need to create iframe again each time because contentDocument
|
| - // is deleted when iframe is removed from its parent.
|
| - this.element.removeChildren();
|
| - var iframe = createElement("iframe");
|
| - iframe.setAttribute("sandbox", ""); // Forbid to run JavaScript and set unique origin.
|
| - iframe.setAttribute("src", this._dataURL);
|
| - this.element.appendChild(iframe);
|
| - },
|
| + /**
|
| + * @override
|
| + */
|
| + willHide() {
|
| + this.element.removeChildren();
|
| + }
|
|
|
| - __proto__: WebInspector.RequestView.prototype
|
| + _createIFrame() {
|
| + // We need to create iframe again each time because contentDocument
|
| + // is deleted when iframe is removed from its parent.
|
| + this.element.removeChildren();
|
| + var iframe = createElement('iframe');
|
| + iframe.setAttribute('sandbox', ''); // Forbid to run JavaScript and set unique origin.
|
| + iframe.setAttribute('src', this._dataURL);
|
| + this.element.appendChild(iframe);
|
| + }
|
| };
|
|
|