vast-parser
vast-parser copied to clipboard
Remove jQuery dependency
jQuery is currently used for:
- Event Emission
- Requesting VAST via AJAX
This seems overkill considering how large jQuery is.
Event Emission
Event Emission can be reimplemented easily, or a smaller library can be used.
AJAX
We can switch over to the Fetch API for requesting VAST. We have multiple options:
- Use the Fetch API directly and assume it's on global scope. If an application supports an environment that doesn't have the Fetch API, they're expect to polyfill it on their end (ideally via dynamic imports or targeted bundles).
- Use a polyfill like
isomorphic-fetch
. This will increase the size of library and not all environment will need the polyfill.
I'd go with Option 1 as the Fetch API seems widely supported in most browsers. And IMO, supplying polyfills for certain environments is not the job of a library.