Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
8f800709
Commit
8f800709
authored
Feb 01, 2019
by
Jason Stafford
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix linter errors (whitespace changes)
parent
38b2fdef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
src/pyodide.js
src/pyodide.js
+3
-7
src/webworker.js
src/webworker.js
+8
-8
No files found.
src/pyodide.js
View file @
8f800709
...
...
@@ -80,12 +80,8 @@ var languagePluginLoader = new Promise((resolve, reject) => {
if
(
self
.
document
)
{
// browser
const
script
=
self
.
document
.
createElement
(
'
script
'
);
script
.
src
=
url
;
script
.
onload
=
(
e
)
=>
{
onload
();
};
script
.
onerror
=
(
e
)
=>
{
onerror
();
};
script
.
onload
=
(
e
)
=>
{
onload
();
};
script
.
onerror
=
(
e
)
=>
{
onerror
();
};
self
.
document
.
body
.
appendChild
(
script
);
}
else
if
(
self
.
importScripts
)
{
// webworker
try
{
...
...
src/webworker.js
View file @
8f800709
...
...
@@ -12,11 +12,11 @@ var onmessage = function(e) { // eslint-disable-line no-unused-vars
self
[
key
]
=
data
[
key
];
}
}
self
.
pyodide
.
runPythonAsync
(
data
.
python
,
()
=>
{})
.
then
((
results
)
=>
{
self
.
postMessage
({
results
});
})
.
catch
((
err
)
=>
{
self
.
pyodide
.
runPythonAsync
(
data
.
python
,
()
=>
{})
.
then
((
results
)
=>
{
self
.
postMessage
({
results
});
})
.
catch
((
err
)
=>
{
// if you prefer messages with the error
self
.
postMessage
({
error
:
err
.
message
});
self
.
postMessage
({
error
:
err
.
message
});
// if you prefer onerror events
// setTimeout(() => { throw err; });
});
...
...
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