remove javascript fetch polyfill

This commit is contained in:
David Lord 2022-02-14 10:33:25 -08:00
parent c7f2ab8e7a
commit 6f6e3289da
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
7 changed files with 22 additions and 24 deletions

View file

@ -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