Conditions | 1 |
Paths | 2 |
Total Lines | 42 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | (function() { |
||
2 | |||
3 | 'use strict'; |
||
4 | |||
5 | var ns = faulancer.namespace('docs.routing'); |
||
|
|||
6 | |||
7 | var _fields = { |
||
8 | links: [] |
||
9 | }; |
||
10 | |||
11 | var _private = { |
||
12 | |||
13 | |||
14 | |||
15 | }; |
||
16 | |||
17 | ns.http = { |
||
18 | |||
19 | get: function(resource, callbackSuccess, callbackError) { |
||
20 | |||
21 | var xhr = new XMLHttpRequest(); |
||
22 | xhr.open('GET', resource); |
||
23 | |||
24 | xhr.onreadystatechange = function() { |
||
25 | |||
26 | if (xhr.readyState === 4 && xhr.status === 200) { |
||
27 | callbackSuccess(xhr.responseText); |
||
28 | } else if (xhr.status === 400) { |
||
29 | callbackError(xhr.responseText); |
||
30 | } |
||
31 | |||
32 | }; |
||
33 | |||
34 | xhr.overrideMimeType('text/html'); |
||
35 | |||
36 | xhr.send(); |
||
37 | |||
38 | } |
||
39 | |||
40 | }; |
||
41 | |||
42 | })(); |
||
43 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.