diff --git a/types/doubleclick-gpt/doubleclick-gpt-tests.ts b/types/doubleclick-gpt/doubleclick-gpt-tests.ts index 5eadd36861..4b843aeb8b 100644 --- a/types/doubleclick-gpt/doubleclick-gpt-tests.ts +++ b/types/doubleclick-gpt/doubleclick-gpt-tests.ts @@ -425,3 +425,9 @@ slot.setTargeting("allow_expandable", "true"); // Example with multiple values for a key inside in an array. slot.setTargeting("interests", ["sports", "music", "movies"]); + +// googletag.display accepts a div element as well as a div ID. +googletag.display(new HTMLElement()); + +// pubads.display accepts a div element. +googletag.pubads().display("/1234567/science", [300, 250], new HTMLElement()); diff --git a/types/doubleclick-gpt/index.d.ts b/types/doubleclick-gpt/index.d.ts index 46092a2165..85bae04796 100644 --- a/types/doubleclick-gpt/index.d.ts +++ b/types/doubleclick-gpt/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Publisher Tag v111 +// Type definitions for Google Publisher Tag v121 // Project: https://developers.google.com/doubleclick-gpt/reference // Definitions by: John Wright // Steven Joyce @@ -63,7 +63,7 @@ declare namespace googletag { defineSlot(adUnitPath: string, size: GeneralSize, opt_div?: string): Slot; destroySlots(opt_slots?: Slot[]): boolean; disablePublisherConsole(): void; - display(div?: string): void; + display(div?: string | Element): void; enableServices(): void; getVersion(): string; openConsole(opt_div?: string): void; @@ -115,7 +115,7 @@ declare namespace googletag { defineOutOfPagePassback(adUnitPath: string): PassbackSlot; definePassback(adUnitPath: string, size: GeneralSize): PassbackSlot; disableInitialLoad(): void; - display(adUnitPath: string, size: GeneralSize, opt_div?: string, opt_clickUrl?: string): Slot; + display(adUnitPath: string, size: GeneralSize, opt_div?: string | Element, opt_clickUrl?: string): Slot; enableAsyncRendering(): boolean; enableSingleRequest(): boolean; enableSyncRendering(): boolean;