Skip to content

Commit

Permalink
remove log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
krschacht committed Feb 19, 2024
1 parent f294701 commit a049125
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/core/drive/morph_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export class MorphRenderer extends PageRenderer {
// Static methods — these helper methods are all static because morphing is done by turbo frames, which is outside of a PageView

static morphElements(currentElement, newElement, morphStyle = "outerHTML") {
console.log(`moprhing elements!`)
this.isMorphingTurboFrame = this.isFrameReloadedWithMorph(currentElement)

Idiomorph.morph(currentElement, newElement, {
Expand Down
14 changes: 0 additions & 14 deletions src/core/frames/frame_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export class FrameController {
}

sourceURLReloaded() {
console.log(`source URL reload called`)
const { src } = this.element
this.#ignoringChangesToAttribute("complete", () => {
this.element.removeAttribute("complete")
Expand All @@ -116,13 +115,8 @@ export class FrameController {
}

async #loadSourceURL() {
console.log(`loading source URL`)
if (this.#isFrameRefreshMorph()) {
console.log(` YES morphing frame!`)

this.#prepareFrameToMorph()
} else {
console.log(` not a morphing frame`)
}

if (this.enabled && this.isActive && !this.complete && this.sourceURL) {
Expand All @@ -138,24 +132,16 @@ export class FrameController {
}

#prepareFrameToMorph() {
console.log(`prepareFrameToMorph`)
this.element.addEventListener("turbo:before-frame-render", (event) => {
event.detail.render = this.#morphFrameUpdate
}, { once: true })
console.log(`finished preparing`)
}

#morphFrameUpdate = (currentElement, newElement) => {
console.log(`morphFrameUpdate`)
try {
dispatch("turbo:before-frame-morph", {
target: currentElement,
detail: { currentElement, newElement }
})
} catch(e) {
console.log(`error in dispatch: ${e}`)
}
console.log(`calling morph elements`)
MorphRenderer.morphElements(currentElement, newElement.children, "innerHTML")
}

Expand Down

0 comments on commit a049125

Please sign in to comment.