electron/browser/api/lib/protocol.coffee
2013-08-25 16:06:29 +08:00

15 lines
455 B
CoffeeScript

module.exports = process.atomBinding 'protocol'
module.exports.RequestStringJob =
class RequestStringJob
constructor: ({mimeType, charset, data}) ->
if typeof data isnt 'string' and not data instanceof Buffer
throw new TypeError('Data should be string or Buffer')
@mimeType = mimeType ? 'text/plain'
@charset = charset ? 'UTF-8'
@data = String data
module.exports.RequestFileJob =
class RequestFileJob
constructor: (@path) ->