Communication
Configure Web Components communication with FactFinder.
Documentation
Add ff-communication to every page that uses FactFinder Web Components. Configure the server endpoint and channel.
<ff-communication
url="https://web-components.fact-finder.de/FACT-Finder"
version="ng"
api="v5"
channel="bergfreunde-co-uk"
default-query="backpack"
search-immediate
></ff-communication>url, version, and channel are required. FactFinder NG also requires api.
Define these attributes first, in this order: url, version, api, then channel. Browser attribute processing differs.
default-query sets the query used on page load. search-immediate starts that query after initialization.
Wait for initialization
ffCommunicationReady fires when communication configuration has propagated. Subscribe before loading the Web Components bundle.
document.addEventListener("ffCommunicationReady", (event) => {
const factfinder = event.factfinder;
const searchImmediate = event.searchImmediate;
// Call this only when you want to trigger the configured default search.
// searchImmediate();
});The event guarantees initialized core, polyfills, configuration, and ready data receivers.
API code
Properties
Events
Last updated
Was this helpful?