… id. Then allow the tokenValue to be a function that is passed the item, and returns a string. This allows more complex data than just the id to be sent to the server.
…to end of demo.html
…happens, so that a change listener can be added to the original element
…ion. Should Token data attributes include all attributes from the returned JSON object or only 'id' and the propertyToSearch
…ighlighting. Both optional fields have their original defaults, but can be overriden using a function that recieves a results item in JSON format as its argument and returns a an HTML string. Any templating system can be used inside this function. Known bugs: (1) highlighter function cannot handle strings with characters accented with diacritics; (2) highlighter may also highlight the string term in other parts of the populated template if the value of the propertyToSearch key exists elsewhere in the template in the same case