GPT v121 - Modified display methods to accept div elements

This commit is contained in:
steven-joyce
2018-02-27 15:59:26 +13:00
parent 9574aaf2d2
commit 52dee462e0
2 changed files with 9 additions and 3 deletions
@@ -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());
+3 -3
View File
@@ -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 <https://github.com/johngeorgewright>
// Steven Joyce <https://github.com/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;