lukeed / lukeed/dequal

Fails to correctly compare objects created by constructors from another realm (like iframes)

Open
#9 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.5k
Forks
36
PR merge metrics
No merged PRs in 30d

Description

This is definitely an edge-case, but when comparing objects like Array across iframe boundaries, instanceof will not work. See MDN's example of this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#instanceof_vs_isArray

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the comparison logic that uses instanceof, then reproduce the MDN cross-iframe Array example with objects from another realm. Done means deep equality correctly compares those cross-realm constructed objects without relying on same-realm instanceof checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.