LearnNewsExamplesServices
Frontmatter
id8792
titleRefactor Portal.canvas.Base: Extract checkCanvas to class method
stateClosed
labels
airefactoring
assigneestobiu
createdAtJan 19, 2026, 1:49 AM
updatedAtJan 19, 2026, 1:52 AM
githubUrlhttps://github.com/neomjs/neo/issues/8792
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 19, 2026, 1:52 AM

Refactor Portal.canvas.Base: Extract checkCanvas to class method

Closed v11.23.0 airefactoring
tobiu
tobiu commented on Jan 19, 2026, 1:49 AM

To improve code readability, testability, and adherence to project conventions, the inline checkCanvas function within Portal.canvas.Base.initGraph should be refactored into a protected class method waitForCanvas.

Changes:

  1. Extract checkCanvas logic into waitForCanvas(canvasId, windowId, hasChange).
  2. Update initGraph to call this.waitForCanvas.
  3. Ensure polling mechanism uses bind or arrow functions to maintain scope.
tobiu added the ai label on Jan 19, 2026, 1:49 AM
tobiu added the refactoring label on Jan 19, 2026, 1:49 AM
tobiu referenced in commit 298b07c - "refactor: Extract checkCanvas to waitForCanvas in Portal.canvas.Base (#8792)" on Jan 19, 2026, 1:51 AM
tobiu assigned to @tobiu on Jan 19, 2026, 1:51 AM
tobiu
tobiu Jan 19, 2026, 1:52 AM

Input from Gemini 3 Pro:

✦ Refactored initGraph to use a protected waitForCanvas method. This improves readability and allows subclasses to potentially hook into the canvas waiting logic.

tobiu closed this issue on Jan 19, 2026, 1:52 AM