Created
August 6, 2013 17:59
-
-
Save treasonx/6166904 to your computer and use it in GitHub Desktop.
Seems like it would be great to refactor into a wire spec?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
'use strict'; | |
var LocationManager = require('modules/spxcontroller/LocationManager'); | |
var WindowManager = require('modules/spxcontroller/WindowManager'); | |
var SlinkAnchorService = require('modules/spxcontroller/SlinkAnchorService'); | |
var PresentationService = require('modules/spxcontroller/PresentationService'); | |
var g = require('utils/globalObject'); | |
var utils = require('utils/utils'); | |
function WindowController(evtBus, dataStore, analytics) { | |
this.slinkService = new SlinkAnchorService(g); | |
this.windowManager = new WindowManager(evtBus, dataStore); | |
this.service = new PresentationService(dataStore, analytics); | |
this.locationManager = new LocationManager(evtBus, | |
this.service, | |
this.windowManager, | |
this.slinkService, { | |
offSiteHandler: utils.getOffsiteHandler(g, analytics, dataStore) | |
}); | |
} | |
WindowController.prototype = { | |
start: function() { | |
this.locationManager.start(); | |
} | |
}; | |
return WindowController; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Definition for
utils/globalObject
:In Thirdparty JavaScript its helpful to be able to swap out window objects without the framework making any assumptions. :)