{
  "id": 4466987,
  "title": "JavaScript Find in Page: DOM Text Above the Codename One Canvas",
  "url": "https://urgent.news/2026/08/30/javascript-find-in-page-dom-text-above-the-codename-one-canvas",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-30T17:26:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/codenameone/javascript-find-in-page-dom-text-above-the-codename-one-canvas-41pj"
  },
  "original_language": "en",
  "account": "Codename One is an open-source framework for creating apps across multiple platforms from a single codebase. The JavaScript port of the framework faced limitations in finding text within its canvas-based rendering, as the browser's text search and selection capabilities could not access pixels drawn by Codename One. To address this, PR #5552 was implemented, promoting eligible visible text into a DOM layer while retaining the canvas for layout, rendering, and accessibility. The browser handles text rasterization, selection, search, and device-pixel resolution, while Codename One remains responsible for measuring and placing every text run. This approach avoids duplicating UI implementations and maintains the browser's ability to handle encryption, selection, and accessibility. The new DOM structure includes a hidden presentation canvas, a text layer with absolute positioning, and an accessibility tree for screen readers. The promotion of text to the DOM layer preserves focus and selection, and the browser can now better interpret input metadata, autocomplete, and spellcheck. The port also incorporates high-DPI display support and preserves the application's JavaScript properties for real-browser verification.",
  "summary": "Browser search cannot find pixels. That was the JavaScript port's text model: Codename One drew each glyph onto a canvas, so a visible label was invisible to find-in-page, text selection, and ordinary browser text machinery. What is Codename One? Codename One is an open-source framework for building native iOS, Android, desktop, and web apps from a single Java or Kotlin codebase. Learn more at…",
  "key_points": [
    "JavaScript port of Codename One faces canvas rendering limitations",
    "PR #5552 promotes visible text to DOM layer for better browser handling",
    "New DOM structure maintains focus, selection, and accessibility features"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}