Releases: willstocks/dynamically-polyfill-features-for-a-script
v0.0.5-beta.9
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 pageLoadedandfunction checkNativeSupporthave now all been combined into a single, function:function dynamicPolyfill- closes #14 - Iterate through array values using
Array.forEach() - Split out
loadMyScriptrepeated code into a helper function - minimising duplication! See #12. - Refactored init function to include a micro-helper function to avoid duplication! See #12.
initialiseMyScriptis no longer called from the "core"pageLoadedfunction - instead it is called depending on whether the scripts that are to be used have loaded or not. See #12.initialiseMyScripthad an unnecessaryvar(var fn = new Function) which has been instead moved inline into thetry{}. See #12.fnsinloadPolyfillwas 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
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 pageLoadedandfunction checkNativeSupporthave now all been combined into a single, function:function dynamicPolyfill - Iterate through array values using
Array.forEach() - Split out
loadMyScriptrepeated code into a helper function - minimising duplication! - Refactored init function to include a micro-helper function to avoid duplication!
initialiseMyScriptis no longer called from the "core"pageLoadedfunction - instead it is called depending on whether the scripts that are to be used have loaded or not.initialiseMyScripthad an unnecessaryvar(var fn = new Function) which has been instead moved inline into thetry{}fnsinloadPolyfillwas 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
README
Updated parameter details
Updated example scripts
Updated stats
The actual scripts
Major overhaul:
- Iterate through array values using
Array.forEach() - Split out
loadMyScriptrepeated code into a helper function - minimising duplication! - Refactored init function to include a micro-helper function to avoid duplication!
initialiseMyScriptis no longer called from the "core"pageLoadedfunction - instead it is called depending on whether the scripts that are to be used have loaded or not.initialiseMyScripthad an unnecessaryvar(var fn = new Function) which has been instead moved inline into thetry{}fnsinloadPolyfillwas 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
README
Updated parameter details
Updated example scripts
Updated stats
The actual scripts
Major overhaul:
- Iterate through array values using
Array.forEach() - Split out
loadMyScriptrepeated code into a helper function - minimising duplication! initialiseMyScriptis no longer called from the "core"pageLoadedfunction - instead it is called depending on whether the scripts that are to be used have loaded or not.initialiseMyScripthad an unnecessaryvar(var fn = new Function) which has been instead moved inline into thetry{}fnsinloadPolyfillwas 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
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
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
Allow array of initialisation functions to run once polyfills and scripts have loaded.
v0.0.4
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
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
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
forloops/if's
General improvements
- Further checks as to whether support exists within browser (not just
feature in windoworwindow.feature) - Merge nested
ifstatements into a singleif
Update README
- Updated script size stats
- Updated deployment instructions