Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

DEPRECATED! It is merged into @litejs/ui/polyfill

Notifications You must be signed in to change notification settings

litejs/browser-upgrade-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@version    1.3.0
@date       2016-07-08
@stability  3 - Stable

Browser upgrade

Implement EcmaScript 5 methods for older browsers.

Contains

  • Function.prototype.bind
  • Object.keys
  • Object.create
  • Array.isArray
  • Array.prototype.indexOf
  • Array.prototype.lastIndexOf
  • Array.prototype.reduce
  • Array.prototype.reduceRight
  • Array.prototype.forEach
  • Array.prototype.every
  • Array.prototype.map
  • Array.prototype.filter
  • Array.prototype.some
  • Date.prototype.toJSON
  • Date.now
  • String.prototype.trim
  • JSON
  • performance.now
  • Object.assign (Use this for optional load)
  • fixes FF3 escape second non-standard argument (bug)
  • removes background image flickers on hover in IE6
  • atob/btoa (base64) // In separate file
  • Promise // In separate file

Notes

  • If no !DOCTYPE is specified, IE6-9 renders the page in IE5 mode!
  • document.createDocumentFragment is unsupported in IE5.5
  • IE 5.5 doesn't support the * collection (all elements) in document.getElementByTagName — it returns a collection with zero members
  • instanceof is not implemented in IE5 MAC
  • Safari 2.0.2: 416 hasOwnProperty introduced October 31, 2005 (Mac OS X v10.4)
// hasOwnProperty polyfill
Object.prototype.hasOwnProperty = function(name, obj) {
    try {
        obj = this.constructor
        while (obj=obj.prototype) if (obj[name]===this[name]) return false
    } catch(e) {}
    return true
}

External links

Licence

Copyright (c) 2012-2016 Lauri Rooden <[email protected]>
The MIT License

About

DEPRECATED! It is merged into @litejs/ui/polyfill

Resources

Security policy

Stars

Watchers

Forks