We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fetch is a member function of window. However, using from js import fetch doesn't realize that and leads to the error:
fetch
window
from js import fetch
TypeError: 'fetch' called on an object that does not implement interface Window.
For Reproducing the Error:
%%py from js import document, Request, fetch, URL img_tag = document.createElement('img') req = Request.new('https://i.ibb.co/3f4yJQS/face4.jpg') def func(response): return response.blob() def func2(blob): objURL = URL.createObjectURL(blob) img_tag.src = objURL fetch(req).then(func).then(func2) document.body.appendChild(img_tag)
The text was updated successfully, but these errors were encountered:
Fix pyodide#461
aa7dd6e
0264f85
from js import func
BUGFIX: Bind functions to window on from js import func (#1126)
c533b07
Fixes #461
from js import ...
mdboom
Successfully merging a pull request may close this issue.
fetch
is a member function ofwindow
.However, using
from js import fetch
doesn't realize that and leads to the error:TypeError: 'fetch' called on an object that does not implement interface Window.
For Reproducing the Error:
The text was updated successfully, but these errors were encountered: