Currently, Skin.js does the following:
- Initiates lazy-loaded images
- Adds classes to the body element: .animations and .touch-events
- Appends an element to the DOM <div class="transparent-shield cloaked-element">
- Emits an event when the #mw-mf-page-center element is clicked
- Get the license information of the page
It is not clear what these functions have in common.
Item #1 is done as side-effects of the constructor function.
#2 seems like it belongs in Browser.js, since animation and touch-event support are properties of the browser.
#3 seems like it should be the responsibility of the overlayManager or whoever utilizes that element.
#4 this event is only used by the main navigation
#5 seems like it could be a property of Page.js
Acceptance criteria
- a little investigation needed as part of this work to figure out where to move this code. A write up is provided and signed off by all developers
- the solution is implemented.