shanechiu

What does 'polyfill' mean?

  •  
  •   shanechiu ·
    shanezhiu · Dec 7, 2017 · 2859 views
    This topic created in 3253 days ago, the information mentioned may be changed or developed.

    I ofen see polyfill words in documents. I wonder know what it points?

    I quote wikipedia:

    In web development, a polyfill is code that implements a feature on web browsers that do not support the feature. Most often, it refers to a JavaScript library that implements an HTML5 web standard, either an established standard (supported by some browsers) on older browsers, or a proposed standard (not supported by any browsers) on existing browsers. Formally, "a polyfill is a shim for a browser API".

    As a result, polyfill is a tools supporting a no-built in feature.

    It is not just belong to web browsers,more than web development.

    8 replies  •  2017-12-08 17:17:03 +08:00
    hjdtl
    hjdtl
    Dec 7, 2017
    1
    百度了一下,感觉这个答案还不错: https://segmentfault.com/a/1190000002593432
    SourceMan
    SourceMan
    Dec 7, 2017
    2
    kamal
    kamal
    Dec 7, 2017
    3
    serco
    serco
    Dec 7, 2017
    4
    英文不忍直视啊。。。
    robinlovemaggie
    robinlovemaggie
    Dec 7, 2017
    5
    简单点说兼容新老浏览器的库就是 polyfill,否则不是。例如,jQuery 不是,Polymer, FlashCavas 是。
    Mutoo
    Mutoo
    Dec 7, 2017
    6
    If you want to use an edge or modern feature on a widespread old browser (e.g. es2015 Promises), you can use the polyfill (e.g. Promises-polyfill), if the new feature is not internal provided but can be implemented within the current javascript's scope.
    shanechiu
    shanechiu
    OP
    Dec 8, 2017
    7
    @Mutoo well,thanks a lot.
    shanechiu
    shanechiu
    OP
    Dec 8, 2017
    8
    @hjdtl I read the article throughly, it is fully. Thank you for your recommendation.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4989 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 05:58 · PVG 13:58 · LAX 21:58 · JFK 00:58
    ♥ Do have faith in what you're doing.