Ticket #1176 (closed feature: invalid)
Dependency mechanism for JS Plugin API
|Reported by:||zach||Owned by:|
Rather than develop our own core utility functions to plugins (_css?, _extend?, _animate?, _ajax?, _log?, ...?), we can just come up with a dependency mechanism so that things don't get loaded multiple times.
Here's Jeroens list of things most people will want to do:
- extend(): extend an object with parameters from another object.
- ajax(): do an AJAX call.
- log(): log data; preferably with log level
- css(): Set CSS data to an element. Preferably include an additional boolean to reset all other CSS properties (so page styling doesn't screw up plugin styling). There's default libs for CSS resets.
- jwplayer.utils.animations: class for some animation effects. If we make these easy to use, people will be able to build slick plugins fast! + transform(): lower-level access to transform. perhaps not needed + scale(): scale a DOM element - with animation support + move(): reposition a DOM element - with animation support + write(): write text in a DOM element - with animation support + rotate(): rotate a DOM element - with animation support + fade(): change the alpha of a DOM element - with animation support.
- jwplayer.utils.dom: default DOM manipulation functions. Nice to have them as shorthands. + wrap(): wrap element with another one + append(): append data to element + find(): find element(s). Should support tag / id / class and return an array. + html(): innerHTML