The SCORM_2004_APIWrapper.js you reference is actually for the content or SCO to locate the SCORM 2004 Runtime provided by the LMS. This is called a "API_1484_11". The API Wrapper itself searches the Document Object Model (DOM) for the API_1484_11. SCO's are typically loaded into IFRAME, Popups or new Windows/Tabs. So they search their parent window for this API. Keep in mind the SCORM 2004 Run-Time Environment PDF from Advanced Distributed Learning goes into these protocols and "rules". An example in my own project would be a light weight "Local_API_1484_11.js". I set this up to mimic the LMS in a local test of the SCO so you don't have as many round trips testing. You could use that as a baseline for a real one, but keep in mind there are many rules all based on the white paper, and this is far from all the error code support.
I don't know of anyone thats released a free version of this since it has strings attached to a server implementation which reads the SCORM CAM Packages (imsmanifest.xml). Passes information along like time limits, launch parameters, completion thresholds etc … You commonly manage all these parameters, assignments, student profiles, then bolt on reports, forums etc...
I have more information on GitHub about the SCO / LMS relationship on my Github project. http://cybercussion.github.io/SCOBot/
If you're working in a non-profit capacity I have a more enhanced LMS Runtime project in beta. Just send me a message.