forked from orbit-oss/flask
remove javascript fetch polyfill
This commit is contained in:
parent
c7f2ab8e7a
commit
6f6e3289da
7 changed files with 22 additions and 24 deletions
|
|
@ -3,15 +3,15 @@ JavaScript Ajax Example
|
|||
|
||||
Demonstrates how to post form data and process a JSON response using
|
||||
JavaScript. This allows making requests without navigating away from the
|
||||
page. Demonstrates using |XMLHttpRequest|_, |fetch|_, and
|
||||
|jQuery.ajax|_. See the `Flask docs`_ about jQuery and Ajax.
|
||||
|
||||
.. |XMLHttpRequest| replace:: ``XMLHttpRequest``
|
||||
.. _XMLHttpRequest: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
|
||||
page. Demonstrates using |fetch|_, |XMLHttpRequest|_, and
|
||||
|jQuery.ajax|_. See the `Flask docs`_ about JavaScript and Ajax.
|
||||
|
||||
.. |fetch| replace:: ``fetch``
|
||||
.. _fetch: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch
|
||||
|
||||
.. |XMLHttpRequest| replace:: ``XMLHttpRequest``
|
||||
.. _XMLHttpRequest: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest
|
||||
|
||||
.. |jQuery.ajax| replace:: ``jQuery.ajax``
|
||||
.. _jQuery.ajax: https://api.jquery.com/jQuery.ajax/
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ page. Demonstrates using |XMLHttpRequest|_, |fetch|_, and
|
|||
Install
|
||||
-------
|
||||
|
||||
::
|
||||
.. code-block:: text
|
||||
|
||||
$ python3 -m venv venv
|
||||
$ . venv/bin/activate
|
||||
|
|
@ -31,7 +31,7 @@ Install
|
|||
Run
|
||||
---
|
||||
|
||||
::
|
||||
.. code-block:: text
|
||||
|
||||
$ export FLASK_APP=js_example
|
||||
$ flask run
|
||||
|
|
@ -42,7 +42,7 @@ Open http://127.0.0.1:5000 in a browser.
|
|||
Test
|
||||
----
|
||||
|
||||
::
|
||||
.. code-block:: text
|
||||
|
||||
$ pip install -e '.[test]'
|
||||
$ coverage run -m pytest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue