UNPKG

raptor

Version:

RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.

24 lines (20 loc) 684 B
define( 'raptor/resources/BrowserResource', 'raptor/resources/Resource', function(require, exports, module) { "use strict"; var BrowserResource = function(searchPathEntry, path, contents) { BrowserResource.superclass.constructor.call(this, searchPathEntry, path); this.path = path; this.contents = contents; }; BrowserResource.prototype = { readAsString: function() { return this.contents; }, getURL: function() { return this.path; } }; return BrowserResource; });