/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/tests/javascript-ignore/ignore.js
http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs · JavaScript · 44 lines · 31 code · 5 blank · 8 comment · 11 complexity · 5a18789fbab9d03113f23fe06274ff80 MD5 · raw file
- function createRequest() {
- //#JSCOVERAGE_IF
- if (window.XMLHttpRequest) {
- return new XMLHttpRequest();
- }
- else if (window.ActiveXObject) {
- return new ActiveXObject('Msxml2.XMLHTTP');
- }
- else {
- throw 'no XMLHttpRequest implementation available';
- }
- }
- function createRequest2() {
- //#JSCOVERAGE_IF
- if (window.XMLHttpRequest) {
- return new XMLHttpRequest();
- }
- //#JSCOVERAGE_IF ! window.XMLHttpRequest
- //#JSCOVERAGE_IF
- if (window.ActiveXObject) {
- return new ActiveXObject('Msxml2.XMLHTTP');
- }
- //#JSCOVERAGE_IF 0
- throw 'no XMLHttpRequest implementation available';
- //#JSCOVERAGE_ENDIF
- //#JSCOVERAGE_ENDIF
- }
- function log(s) {
- //#JSCOVERAGE_IF
- if (window.console && window.console.log) {
- console.log(s);
- }
- else if (window.opera && window.opera.postError) {
- opera.postError(s);
- }
- }
- var request = createRequest();
- var request2 = createRequest2();
- log('created requests');