WebReflection / WebReflection/linkedom
CSSStyleSheet.insertRule returning undefined if index argument not provided
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.1k
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
Suggested fix:
CSSStyleSheet.js:39
CSSOM.CSSStyleSheet.prototype.insertRule = function(rule, index = this.cssRules.length) {
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in CSSStyleSheet.js at line 39, where CSSStyleSheet.prototype.insertRule is defined. Verify the omitted-index case uses the end of cssRules and no longer returns undefined; confirm the existing behavior for an explicitly supplied index remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100