lace:ignore

Prevent an element from being updated during DOM morphing. The Interlace equivalent of Livewire's wire:ignore.

Syntax

<div lace:ignore>Content that never changes</div>

Behavior

Elements marked with lace:ignore are skipped during DOM morphing. Their content and attributes remain unchanged regardless of server updates, so anything a third-party library rendered inside them is left untouched.

Use cases

  • Third-party widgets (maps, ads, embeds)
  • Elements with complex client-side state
  • Canvas elements with drawings
  • Video players with playback state
  • Rich text editors

Examples

Third-Party Widget

<div lace:ignore>
    <div id="google-map"></div>
    <script>
        // Google Maps initialization
        new google.maps.Map(document.getElementById('google-map'), {...});
    </script>
</div>

Video Player

<div lace:ignore>
    <video id="player" controls>
        <source src="{{ video_url }}" type="video/mp4">
    </video>
</div>

Canvas Element

<canvas lace:ignore id="drawing-canvas" width="800" height="600"></canvas>
<script>
    const canvas = document.getElementById('drawing-canvas');
    const ctx = canvas.getContext('2d');
    // Drawing logic...
</script>

Rich Text Editor

<div lace:ignore>
    <div id="editor"></div>
    <script>
        // Initialize Quill, TinyMCE, etc.
        new Quill('#editor', {...});
    </script>
</div>

View this page as markdown - handy as context for your AI tools. Full index at /llms.txt.

Theme
Accent
Ink