Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();
</script>

<form>
Expand All @@ -129,4 +129,4 @@
<script type="module" src="https://unpkg.com/@github/auto-complete-element@latest/dist/bundle.js"></script>
</body>
</html>