Skip to content

Commit 1b91450

Browse files
authored
Sync latest changes to @types/google-publisher-tag
1 parent f6a4575 commit 1b91450

3 files changed

Lines changed: 43 additions & 3 deletions

File tree

types/google-publisher-tag/google-publisher-tag-tests.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Tests for Google Publisher Tag 1.20240701
2-
// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/b912994ba21b4a754ba6a6289e859fc2b1a907af
1+
// Tests for Google Publisher Tag 1.20240729
2+
// Synced from: https://github.com/googleads/google-publisher-tag-types/commit/1b9687184a46e7cf847a897b13539b78c3393305
33

44
// Test for googletag.cmd
55
function test_googletag_cmd() {
@@ -646,6 +646,18 @@ function test_googletag_config_adExpansionConfig() {
646646
});
647647
}
648648

649+
// Test for googletag.config.PageSettingsConfig.adYield
650+
function test_googletag_config_pageSettingsConfig_adYield() {
651+
// Disable yielding.
652+
googletag.setConfig({ adYield: "DISABLED" });
653+
654+
// Enable yielding for all slots.
655+
googletag.setConfig({ adYield: "ENABLED_ALL_SLOTS" });
656+
657+
// Enable yielding only for slots outside of the viewport (default).
658+
googletag.setConfig({ adYield: null });
659+
}
660+
649661
// Test for googletag.config.PrivacyTreatmentsConfig.treatments
650662
function test_googletag_config_privacyTreatmentsConfig_treatments() {
651663
// Disable personalization across the entire page.

types/google-publisher-tag/index.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,34 @@ declare namespace googletag {
18021802
* Settings to control publisher provided signals (PPS).
18031803
*/
18041804
pps?: PublisherProvidedSignalsConfig | null;
1805+
1806+
/**
1807+
* Setting to control whether GPT should yield the JS thread when
1808+
* rendering creatives.
1809+
*
1810+
* GPT will yield only for browsers that support the Scheduler.postTask
1811+
* API.
1812+
*
1813+
* Supported values:
1814+
* - `null` (default): GPT will yield the JS thread for slots outside of
1815+
* the viewport.
1816+
* - `ENABLED_ALL_SLOTS`: GPT will yield the JS thread for all slots
1817+
* regardless of whether the slot is within the viewport.
1818+
* - `DISABLED`: GPT will not yield the JS thread.
1819+
*
1820+
* @example
1821+
* // Disable yielding.
1822+
* googletag.setConfig({adYield: 'DISABLED'});
1823+
*
1824+
* // Enable yielding for all slots.
1825+
* googletag.setConfig({adYield: 'ENABLED_ALL_SLOTS'});
1826+
*
1827+
* // Enable yielding only for slots outside of the viewport (default).
1828+
* googletag.setConfig({adYield: null});
1829+
*
1830+
* @see [Scheduler: postTask() method](https://developer.mozilla.org/docs/Web/API/Scheduler/postTask)
1831+
*/
1832+
adYield?: "DISABLED" | "ENABLED_ALL_SLOTS" | null;
18051833
}
18061834

18071835
/**

types/google-publisher-tag/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/google-publisher-tag",
4-
"version": "1.20240701.9999",
4+
"version": "1.20240729.9999",
55
"nonNpm": true,
66
"nonNpmDescription": "Google Publisher Tag",
77
"projects": [

0 commit comments

Comments
 (0)