furo-fetch-json

furo-fetch-json #

@furo/util v2.1.19
import '@furo/util/src/furo-fetch-json.js';
exports FuroFetchJson js
exports <furo-fetch-json> custom-element-definition
superclass LitElement
mixes FBP

summary fetch json data

furo-fetch-json Fetches and parses json data from a source.

1
<furo-fetch-json src="/example.json" fn-fetch="|--FBPready" at-data="--contentReceived"></furo-fetch-json>

Attributes and Properties #

src #

src String

the url you want to fetch

Events #

data #

at-data{Object} json data

Fired when data received and json parsed

parse-error #

at-parse-errorerror

Fired when json is not parseable

Methods #

fetch #

fetch() ⟹ Promise

*fn-fetch

fetch and parse the data from specified src.

Use fetch-src if you want to pass the source url



fetchSrc #

fetchSrc(source *String* ) ⟹ Promise

fn-fetch-src

fetch json data from source

  • source
  • String source