The hasSection
command is used to detect whether your implementation has generated a specific section for the end-user.
Command
A successful request is comprised of three parts:
Argument | Type | Value |
---|---|---|
command | string | 'hasSection' |
callback | function | function (data: boolean, success: boolean) |
parameter | string | API prefix of the section |
__gpp('hasSection', (data,success)=>{console.log("Specified section detected: " + success)}, 'usnat');
function hasSection_fn(data, success) {
console.log("Specified section detected: " + success);
}
...
__gpp('hasSection', hasSection_fn, 'usnat')
Response
In addition to any custom code you might implement when your function executes, the command will return true
for the success
parameter if your implementation has the specified section.