proomt

Search

Search posts, papers, and topics

All posts

CodeName OneShai Almog4 min readintermediate

JavaScript Find in Page: DOM Text Above the Codename One Canvas

Summary

The Codename One JavaScript port now projects eligible text runs from its canvas onto an absolute‑positioned DOM layer, restoring browser find‑in‑page, selection, and accessibility while keeping layout on the canvas. It also adds high‑DPI backing, incremental semantic diffing, and richer input attributes, with a few edge cases still rendered on the canvas.

  • Promotes eligible visible text runs to an absolute‑positioned DOM layer, enabling find‑in‑page, selection, and assistive tech without handing layout to the browser.
  • Diffs the semantic tree incrementally so element identity and listeners persist across scroll invalidations, preserving focus and selection.
  • Uses a high‑DPI OffscreenCanvas backing surface and updates devicePixelRatio on zoom or display changes for crisp rendering.
  • Enriches native inputs with inputmode, autocomplete, autocapitalize, and spellcheck attributes, fixing password‑field handling bugs.

Engineers building web‑based UI frameworks need a practical way to combine canvas rendering with native browser features, and this post shows a concrete solution.

6/10

Related reading

  1. Faster Starts, Less JavaScript Overhead

    Codename One reduced startup latency and JavaScript overhead by publishing screen state atomically, indexing style lookups, avoiding unnecessary artwork generation, and refining suspension analysis, yielding measurable speedups.

    CodeName Onecodenameone.com7 min
  2. Javadoc That Feels Like Your Website

    Codename One replaced its Javadoc‑generated site with a Hugo‑based pipeline: a custom doclet emits one Hugo content file per Java type, preserving Markdown comments, generating a lightweight search index, and keeping the traditional offline Javadoc archive. The approach reduces index size (1.9 MB → 341 KB gzipped), retains existing anchors, and can be reused for other Java projects.

    CodeName Onecodenameone.com4 min
  3. Inertia DevTools Now Available for Firefox

    Inertia DevTools now has an official Firefox extension matching the Chrome version, adding an Inertia panel to DevTools that logs visits, props (with badges), request/response data, route info, and links to source files, with redaction of secrets.

    Laravellaravel-news.com1 minrelease
  4. Fill an SMS Verification Code Without Reading the Inbox

    Codename One adds a one‑time‑code autofill component that leverages iOS, Android, and browser autofill APIs, eliminating the need for SMS‑reading permissions. The new `PhoneVerification` component handles phone entry, code entry, resend timing, and server callbacks, while the UI uses a single hidden editor to back six visual boxes, improving typing, paste, and accessibility. The post explains the…

    CodeName Onecodenameone.com3 min