Last change
on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
710 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var inherits = require('inherits')
|
---|
4 | , HtmlfileReceiver = require('./receiver/htmlfile')
|
---|
5 | , XHRLocalObject = require('./sender/xhr-local')
|
---|
6 | , AjaxBasedTransport = require('./lib/ajax-based')
|
---|
7 | ;
|
---|
8 |
|
---|
9 | function HtmlFileTransport(transUrl) {
|
---|
10 | if (!HtmlfileReceiver.enabled) {
|
---|
11 | throw new Error('Transport created when disabled');
|
---|
12 | }
|
---|
13 | AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject);
|
---|
14 | }
|
---|
15 |
|
---|
16 | inherits(HtmlFileTransport, AjaxBasedTransport);
|
---|
17 |
|
---|
18 | HtmlFileTransport.enabled = function(info) {
|
---|
19 | return HtmlfileReceiver.enabled && info.sameOrigin;
|
---|
20 | };
|
---|
21 |
|
---|
22 | HtmlFileTransport.transportName = 'htmlfile';
|
---|
23 | HtmlFileTransport.roundTrips = 2;
|
---|
24 |
|
---|
25 | module.exports = HtmlFileTransport;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.