JezK
Edit File: error_renderer.js
// Generated by CoffeeScript 2.7.0 (function() { require('./renderer'); Turbolinks.ErrorRenderer = class ErrorRenderer extends Turbolinks.Renderer { constructor(html) { var htmlElement; htmlElement = document.createElement("html"); htmlElement.innerHTML = html; super(html); this.newHead = htmlElement.querySelector("head"); this.newBody = htmlElement.querySelector("body"); } render(callback) { return this.renderView(() => { this.replaceHeadAndBody(); this.activateBodyScriptElements(); return callback(); }); } replaceHeadAndBody() { var body, head; ({head, body} = document); head.parentNode.replaceChild(this.newHead, head); return body.parentNode.replaceChild(this.newBody, body); } activateBodyScriptElements() { var element, i, len, ref, replaceableElement, results; ref = this.getScriptElements(); results = []; for (i = 0, len = ref.length; i < len; i++) { replaceableElement = ref[i]; element = this.createScriptElement(replaceableElement); results.push(replaceableElement.parentNode.replaceChild(element, replaceableElement)); } return results; } getScriptElements() { return document.documentElement.querySelectorAll("script"); } }; }).call(this);