Miss any of our Open RFC calls?Watch the recordings here! »

@iabtcf/stub

1.1.0-1 • Public • Published

@iabtcf/stub

Cmp API Stub code. Maybe included in commonjs loader or dropped directly on the page.

Installation

npm

npm install @iabtcf/stub

yarn

yarn add @iabtcf/stub

Using

include via module loading
import * as cmpstub from '@iabtcf/stub';

or

const cmpstub = require('@iabtcf/stub');

then execute:

cmpstub();

this should generate the __tcfapi() window function with the queing functionality.

to drop on a page
git clone https://github.com/InteractiveAdvertisingBureau/iabtcf-es.git

cd iabtcf-es/modules/stub/

yarn // or npm install

yarn build // or npm run build

Built stub will be output to ./lib

Getting queue of commands
const queue = __tcfapi();
console.log(queue); // [ ['command', 2, callback], ...]

Install

npm i @iabtcf/stub

DownloadsWeekly Downloads

521

Version

1.1.0-1

License

Apache-2.0

Unpacked Size

3.27 kB

Total Files

5

Homepage

iabtcf.com/

Last publish

Collaborators

  • avatar