Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
jio
Commits
88dc21cc
Commit
88dc21cc
authored
Oct 09, 2019
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix node.js test: move document===undefined check to cloudooo storage
parent
96b399eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
src/jio.js
src/jio.js
+3
-14
src/jio.storage/cloudooostorage.js
src/jio.storage/cloudooostorage.js
+18
-7
No files found.
src/jio.js
View file @
88dc21cc
...
...
@@ -18,9 +18,9 @@
* See https://www.nexedi.com/licensing for rationale and options.
*/
/*global window, RSVP, Blob, XMLHttpRequest, QueryFactory, Query, atob,
FileReader, ArrayBuffer, Uint8Array
, navigator
*/
FileReader, ArrayBuffer, Uint8Array */
(
function
(
window
,
RSVP
,
Blob
,
QueryFactory
,
Query
,
atob
,
FileReader
,
ArrayBuffer
,
Uint8Array
,
navigator
)
{
FileReader
,
ArrayBuffer
,
Uint8Array
)
{
"
use strict
"
;
/* Safari does not define DOMError */
...
...
@@ -28,17 +28,6 @@
window
.
DOMError
=
{};
}
/* Document is not defined in ServiceWorkser */
if
(
window
.
document
===
undefined
)
{
window
.
document
=
{
createElementNS
:
function
()
{
throw
new
Error
(
'
document.createElementNS is not supported by
'
+
navigator
.
userAgent
);
}
};
}
var
util
=
{},
jIO
;
...
...
@@ -566,4 +555,4 @@
window
.
jIO
=
jIO
;
}(
window
,
RSVP
,
Blob
,
QueryFactory
,
Query
,
atob
,
FileReader
,
ArrayBuffer
,
Uint8Array
,
navigator
));
FileReader
,
ArrayBuffer
,
Uint8Array
));
src/jio.storage/cloudooostorage.js
View file @
88dc21cc
...
...
@@ -19,10 +19,21 @@
*/
/*jslint nomen: true*/
/*global
document, jIO, RSVP, DOMParser, XMLSerialize
r*/
(
function
(
document
,
jIO
,
RSVP
,
DOMParser
,
XMLSerialize
r
)
{
/*global
window, jIO, RSVP, DOMParser, XMLSerializer, navigato
r*/
(
function
(
window
,
jIO
,
RSVP
,
DOMParser
,
XMLSerializer
,
navigato
r
)
{
"
use strict
"
;
/* Document is not defined in ServiceWorker */
if
(
window
.
document
===
undefined
)
{
window
.
document
=
{
createElementNS
:
function
()
{
throw
new
Error
(
'
document.createElementNS is not supported by
'
+
navigator
.
userAgent
);
}
};
}
var
parser
=
new
DOMParser
(),
serializer
=
new
XMLSerializer
();
...
...
@@ -50,13 +61,13 @@
if
(
conversion_kw
)
{
for
(
key
in
conversion_kw
)
{
if
(
conversion_kw
.
hasOwnProperty
(
key
))
{
elt
=
document
.
createElementNS
(
null
,
conversion_kw
[
key
][
1
]);
elt
=
window
.
document
.
createElementNS
(
null
,
conversion_kw
[
key
][
1
]);
elt
.
textContent
=
conversion_kw
[
key
][
0
];
value
=
document
.
createElementNS
(
null
,
"
value
"
);
value
=
window
.
document
.
createElementNS
(
null
,
"
value
"
);
value
.
appendChild
(
elt
);
name
=
document
.
createElementNS
(
null
,
"
name
"
);
name
=
window
.
document
.
createElementNS
(
null
,
"
name
"
);
name
.
textContent
=
key
;
member
=
document
.
createElementNS
(
null
,
"
member
"
);
member
=
window
.
document
.
createElementNS
(
null
,
"
member
"
);
member
.
appendChild
(
name
);
member
.
appendChild
(
value
);
struct
[
0
].
appendChild
(
member
);
...
...
@@ -165,4 +176,4 @@
jIO
.
addStorage
(
'
cloudooo
'
,
CloudoooStorage
);
}(
document
,
jIO
,
RSVP
,
DOMParser
,
XMLSerialize
r
));
}(
window
,
jIO
,
RSVP
,
DOMParser
,
XMLSerializer
,
navigato
r
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment