Skip to content

Releases: willstocks/dynamically-polyfill-features-for-a-script

v0.0.5-beta.9

11 Feb 09:22
a873dab

Choose a tag to compare

v0.0.5-beta.9 Pre-release
Pre-release

README

Updated parameter details
Updated example scripts
Updated deployment instructions (include "local")
Updated stats

The actual scripts

Major overhaul:

  • I realised I had two functions that were simply there to call other functions. They weren't doing anything for themselves! Therefore, function dynamicPolyfill, function pageLoaded and function checkNativeSupport have now all been combined into a single, function: function dynamicPolyfill - closes #14
  • Iterate through array values using Array.forEach()
  • Split out loadMyScript repeated code into a helper function - minimising duplication! See #12.
  • Refactored init function to include a micro-helper function to avoid duplication! See #12.
  • initialiseMyScript is no longer called from the "core" pageLoaded function - instead it is called depending on whether the scripts that are to be used have loaded or not. See #12.
  • initialiseMyScript had an unnecessary var (var fn = new Function) which has been instead moved inline into the try{}. See #12.
  • fns in loadPolyfill was unused... not sure how it even got there! See #12.
  • Order functions logically
  • Inline comments to explain what each step is doing
  • Retain backwards compatibility!
  • Support for Safari and its weird behaviours. Closes #13.
  • General tidying up of code. See #12.
  • Formatting fixes

Previous beta's:

Fix erroneous try{}catch{}
Remove console.log from dynamicPolyfill.js that shouldn't have remained
Add various console messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes [NOW DEPRECATED]
Allow array to be passed for:

  • features (parameter 1)
  • scriptURL (parameter 2)
  • initFunction (parameter 3)
    You can still pass simple strings to each if you want though
    Closes #10 and closes #8

Fix issue where if initFunction wasn't an array, it wouldn't execute
Deprecated dynamicpolyfill-consolemessages.js due to complexity to maintain (if you really want it - log an issue and I'll re-add it!)

v0.0.5-beta.8

10 Feb 21:11
30b4573

Choose a tag to compare

v0.0.5-beta.8 Pre-release
Pre-release

README

Updated parameter details
Updated example scripts
Updated stats

The actual scripts

Major overhaul:

  • I realised I had two functions that were simply there to call other functions. They weren't doing anything for themselves! Therefore, function dynamicPolyfill, function pageLoaded and function checkNativeSupport have now all been combined into a single, function: function dynamicPolyfill
  • Iterate through array values using Array.forEach()
  • Split out loadMyScript repeated code into a helper function - minimising duplication!
  • Refactored init function to include a micro-helper function to avoid duplication!
  • initialiseMyScript is no longer called from the "core" pageLoaded function - instead it is called depending on whether the scripts that are to be used have loaded or not.
  • initialiseMyScript had an unnecessary var (var fn = new Function) which has been instead moved inline into the try{}
  • fns in loadPolyfill was unused... not sure how it even got there!
  • Order functions logically
  • Inline comments to explain what each step is doing
  • Retain backwards compatibility!
  • Support for Safari and its weird behaviours.
  • General tidying up of code

Previous beta's:

Fix erroneous try{}catch{}
Remove console.log from dynamicPolyfill.js that shouldn't have remained
Add various console messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes [NOW DEPRECATED]
Allow array to be passed for:

  • features (parameter 1)
  • scriptURL (parameter 2)
  • initFunction (parameter 3)
    You can still pass simple strings to each if you want though
    Closes #10 and closes #8

Fix issue where if initFunction wasn't an array, it wouldn't execute
Deprecated dynamicpolyfill-consolemessages.js due to complexity to maintain (if you really want it - log an issue and I'll re-add it!)

v0.0.5-beta.7

08 Feb 16:17
1195cfa

Choose a tag to compare

v0.0.5-beta.7 Pre-release
Pre-release

README

Updated parameter details
Updated example scripts
Updated stats

The actual scripts

Major overhaul:

  • Iterate through array values using Array.forEach()
  • Split out loadMyScript repeated code into a helper function - minimising duplication!
  • Refactored init function to include a micro-helper function to avoid duplication!
  • initialiseMyScript is no longer called from the "core" pageLoaded function - instead it is called depending on whether the scripts that are to be used have loaded or not.
  • initialiseMyScript had an unnecessary var (var fn = new Function) which has been instead moved inline into the try{}
  • fns in loadPolyfill was unused... not sure how it even got there!
  • Order functions logically
  • Inline comments to explain what each step is doing
  • Retain backwards compatibility!

Previous beta's:

Fix erroneous try{}catch{}
Remove console.log from dynamicPolyfill.js that shouldn't have remained
Add various console messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes
Allow array to be passed for:

  • features (parameter 1)
  • scriptURL (parameter 2)
  • initFunction (parameter 3)
    You can still pass simple strings to each if you want though

Fix issue where if initFunction wasn't an array, it wouldn't execute
Deprecated dynamicpolyfill-consolemessages.js due to complexity to maintain (if you really want it - log an issue and I'll re-add it!)

v0.0.5-beta.6

08 Feb 16:06
73a38f5

Choose a tag to compare

v0.0.5-beta.6 Pre-release
Pre-release

README

Updated parameter details
Updated example scripts
Updated stats

The actual scripts

Major overhaul:

  • Iterate through array values using Array.forEach()
  • Split out loadMyScript repeated code into a helper function - minimising duplication!
  • initialiseMyScript is no longer called from the "core" pageLoaded function - instead it is called depending on whether the scripts that are to be used have loaded or not.
  • initialiseMyScript had an unnecessary var (var fn = new Function) which has been instead moved inline into the try{}
  • fns in loadPolyfill was unused... not sure how it even got there!
  • Order functions logically
  • Inline comments to explain what each step is doing
  • Retain backwards compatibility!

Previous beta's:

Fix erroneous try{}catch{}
Remove console.log from dynamicPolyfill.js that shouldn't have remained
Add various console messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes
Allow array to be passed for:

  • features (parameter 1)
  • scriptURL (parameter 2)
  • initFunction (parameter 3)
    You can still pass simple strings to each if you want though

Fix issue where if initFunction wasn't an array, it wouldn't execute
Deprecated dynamicpolyfill-consolemessages.js due to complexity to maintain (if you really want it - log an issue and I'll re-add it!)

v0.0.5-beta.5

06 Feb 10:56
23704a6

Choose a tag to compare

v0.0.5-beta.5 Pre-release
Pre-release

README

Updated parameter details
Updated example scripts
Updated stats

The actual scripts

Fix erroneous try{}catch{}
Remove console.log from dynamicPolyfill.js that shouldn't have remained
Add various console messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes
Allow array to be passed for:

  • features (parameter 1)
  • scriptURL (parameter 2)
  • initFunction (parameter 3)
    You can still pass simple strings to each if you want though

Fix issue where if initFunction wasn't an array, it wouldn't execute

v0.0.5-beta.3

05 Feb 11:29
098fdf7

Choose a tag to compare

v0.0.5-beta.3 Pre-release
Pre-release

README

Updated parameter details
Updated example scripts
Updated stats

The actual scripts

Fix erroneous try{}catch{}
Remove console.log from dynamicPolyfill.js that shouldn't have remained
Add various console messages to dynamicpolyfill-consolemessages.js for troubleshooting/debugging/fun purposes
Allow array to be passed for:

  • features (parameter 1)
  • scriptURL (parameter 2)
  • initFunction (parameter 3)
    You can still pass simple strings to each if you want though

v0.0.5-beta.1

05 Feb 09:35
b08852a

Choose a tag to compare

v0.0.5-beta.1 Pre-release
Pre-release

Allow array of initialisation functions to run once polyfills and scripts have loaded.

v0.0.4

05 Feb 09:27
23ca11c

Choose a tag to compare

Removed unused if statement (stripped bloat, giving performance improvement)
Removed unused variables (stripped bloat)
Parsing string ("function to run" variable) as a function to allow execution once everything is ready
Updated README details (script size stats, deployment/usage instructions/blank or null script value)
Updated all scripts to cater for new changes (dynamicpolyfill.js, dynamicpolyfill.min.js, dynamicpolyfill-consolemessages.js)
Re-minified dynamicpolyfill.min.js
Cater for null value script to load

v0.04-beta.1

01 Feb 15:19
9b564eb

Choose a tag to compare

v0.04-beta.1 Pre-release
Pre-release

Removed unused if statement (stripped bloat, giving performance improvement)
Removed unused variables (stripped bloat)
Parsing string ("function to run" variable) as a function to allow execution once everything is ready
Updated README details (script size stats, deployment/usage instructions)
Updated all scripts to cater for new changes (dynamicpolyfill.js, dynamicpolyfill.min.js, dynamicpolyfill-consolemessages.js)
Re-minified dynamicpolyfill.min.js
Cater for null value script to load

v0.03

28 Jan 14:45
bbcf443

Choose a tag to compare

Make the script more "dynamic" (Issue #4)

  • Allow dynamic working - CDN usage or self-hosted
  • There's now the ability to call this function off of a CDN as opposed to having to include it within a local/self-hosted JS file. Example function in README
  • Tweak deployment instructions to cater for "CDN" loading of script

Optimise performance (a little)

  • Store polyfill requirements in an array and grab them all via a single request as opposed to making (potentially) multiple calls to polyfill.io
  • Remove erroneous return
  • MINIFICATION!!!!
  • Further caching outside of for loops/if's

General improvements

  • Further checks as to whether support exists within browser (not just feature in window or window.feature)
  • Merge nested if statements into a single if

Update README

  • Updated script size stats
  • Updated deployment instructions