From c4d99ef1e7d16c6740fc83b145945d96a02f508f Mon Sep 17 00:00:00 2001 From: Jeremy Danyow Date: Tue, 25 Feb 2025 14:12:34 -0800 Subject: [PATCH 1/2] sync fetchResult example with code --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 609f080..265b63f 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ As an example: ## Properties -- `fetchResult` you can override the default method used to query for results by overriding this property: `document.querySelector('auto-complete').fetchResult = async (el, url) => (await fetch(url)).text()` +- `fetchResult` you can override the default method used to query for results by overriding this property: `document.querySelector('auto-complete').fetchResult = async (url) => (await fetch(url)).text()` ## Events From 9c5bda8b6a2905cb13ef69cdd9368b1422ef99a0 Mon Sep 17 00:00:00 2001 From: Jeremy Danyow Date: Tue, 25 Feb 2025 14:18:39 -0800 Subject: [PATCH 2/2] Update index.html --- examples/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/index.html b/examples/index.html index bd89f1f..15a81a0 100644 --- a/examples/index.html +++ b/examples/index.html @@ -109,8 +109,8 @@ } return Promise.resolve(new Response(robotsList)); } - // fetchResult must be a function that return a Promise of string and that accepts as parameters an element and an URL - document.querySelector("auto-complete#custom-fetching-method").fetchResult = async (el, url) => (await fetch(url)).text(); + // fetchResult must be a function that return a Promise of string and that accepts as parameters a URL + document.querySelector("auto-complete#custom-fetching-method").fetchResult = async (url) => (await fetch(url)).text();
@@ -129,4 +129,4 @@ - \ No newline at end of file +