diff --git a/_source/handbook/02_drive.md b/_source/handbook/02_drive.md index 5d3f840..d3eb145 100644 --- a/_source/handbook/02_drive.md +++ b/_source/handbook/02_drive.md @@ -79,14 +79,14 @@ Restoration visits cannot be canceled and do not fire `turbo:before-visit`. Turb Applications can customize the rendering process by adding a document-wide `turbo:before-render` event listener and overriding the `event.detail.render` property. -For example, you could merge the response document's `` element into the requesting document's `` element with [morphdom](https://github.com/patrick-steele-idem/morphdom): +For example, you could merge the response document's `` element into the requesting document's `` element with [idiomorph](https://github.com/bigskysoftware/idiomorph) or [morphdom](https://github.com/patrick-steele-idem/morphdom): ```javascript -import morphdom from "morphdom" +import { Idiomorph } from "idiomorph" addEventListener("turbo:before-render", (event) => { event.detail.render = (currentElement, newElement) => { - morphdom(currentElement, newElement) + Idiomorph.morph(currentElement, newElement) } }) ```