Skip to content

Remove jQuery dependency #7

@jahed

Description

@jahed

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:

  1. 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).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions