Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lighthouse Issues And Legacy JavaScript In Codebase #1382

Open
myselfgautham opened this issue May 27, 2024 · 0 comments
Open

Lighthouse Issues And Legacy JavaScript In Codebase #1382

myselfgautham opened this issue May 27, 2024 · 0 comments
Labels
triage New issues

Comments

@myselfgautham
Copy link

Current Behavior

The Below Functions On Line 15 Of The CDN Delivered Version Of Ionicons Are Considered As Legacy Function And Should Be Updated Ideally ( Yes Its Version 7.1.0 )

  • Array.prototype.fill
  • Array.prototype.filter
  • Array.prototype.find
  • Array.prototype.findIndex
  • Array.prototype.forEach
  • Array.from
  • Array.prototype.map
  • Array.prototype.some
  • Number.isInteger
  • Number.isSafeInteger
  • Object.entries
  • Object.freeze
  • Object.getOwnPropertyDescriptors
  • Object.getPrototypeOf
  • Object.isExtensible
  • Object.isFrozen
  • Object.isSealed
  • Object.keys
  • Object.preventExtensions
  • Object.seal
  • Object.values
  • String.prototype.codePointAt
  • String.fromCodePoint
  • String.raw
  • String.prototype.repeat

Expected Behavior

The Above Mentioned Methods Should Ideally Be In The More Modern Version Of Themselves So That We Can Potentially Save 23.0 KiB ( As Per Lighthouse ) On The Size Of The Package And It Should Result In Better Compatibility On Modern Browsers

For Example

Array.prototype.map Can Be Changes To Well array.map()
And Much More

Steps to Reproduce

https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js
https://unpkg.com/[email protected]/dist/ionicons/ionicons.js

Just Import Them In A Good Enough HTML Page That Can Be Recognised By Lighthouse And Run The Test Then View The Performance Section For This Issue It Will Be Displayed There With Potential Suggestions As Well

Code Reproduction URL

https://gist.github.com/myselfgautham/5ee7d88dce240c245796c6a7b380dd4f

Additional Information

They Are An Easy Fix They Require Changing Existing Legacy Methods To Their Modern Counterparts. For Your Information This Was Spotted Since Chrome Version 125.0.6422.60 ( 64Bit ). I Will Try To Look Into It If I Can And If Time Is Available

@myselfgautham myselfgautham added the triage New issues label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage New issues
Projects
None yet
Development

No branches or pull requests

1 participant