willFetchData
callback. Your function will receive the datasource to be fetched as an argument, which you may modify and return. See below for an example.datasource
, an object with the following structurefeatureId
, the 12-byte unique identifier of your feature (which you can find in the Export instructions in the Builder).urlParams
property. You must return the datasource, if you have no modifications return the datasource unmodified.Mason.callback
function to register your willSendData
callback. Here is an example:callback
function is an optional feature id. Even though datasources are shared across all features in a project, fetch events are triggered by feature's mounting (more on this below). If you want Mason to invoke a callback only when a specific feature is fetching a datasource, you may provide its id as the third argument.