PubAdsService
nestads.PubAdsService
Service를 상속받아서 사용하고 있습니다.
메서드 요약
지정된 슬롯에서 광고를 삭제하고 광고를 빈 콘텐츠로 대체합니다.
이 서비스와 연결된 슬롯 목록을 가져옵니다.
nestads.Service.getSlots
에서 상속됨
광고의 초기 요청이 이전 PubAdsService.disableInitialLoad
호출에 의해 성공적으로 중지되었는지 여부를 반환합니다.
페이지의 특정 또는 모든 슬롯에 대한 새 광고를 가져와 표시
합니다.
이전에 등록된 리스너를 제거합니다.
광고의 가로 가운데 맞춤을 사용 또는 사용 중지합니다.
중앙 정렬은 기본적으로 사용 중지되어 있습니다.
clear
clear(slots?:
Slot
[]): boolean
지정된 슬롯에서 광고를 삭제합니다.
예시
const slot1 = nestads.defineSlot(`${placementCode}`, [728, 90], `${divId}`);
nestads.display(`${divId}`);
// This call to clear both slot1 and slot2.
nestads.pubAds().clear([slot1]);
// This call to clear all slots.
nestads.pubAds().clear();
슬롯을 지정하지 않으면 모든 슬롯을 삭제합니다.
slots?:
Slot
[]
지울 슬롯의 배열입니다. 슬롯을 지정하지 않으면 모든 슬롯을 삭제합니다.
boolean
슬롯이 지워지면 true
를 반환하고 그렇지 않으면 false
를 반환합니다.
disableInitialLoad
disableInitialLoad(): void
페이지 로드 시 광고 요청을 사용 중지합니다.
isInitialLoadDisabled
isInitialLoadDisabled(): boolean
광고의 초기 요청이 이전 PubAdsService.disableInitialLoad
호출에 의해 성공적으로 중지되었는지 여부를 반환합니다.
boolean
PubAdsService.disableInitialLoad
에 대한 이전 호출이 성공하면 true,
그렇지 않은 경우 false
을 반환합니다.
refresh
refresh(slots?: null |
Slot
[]
모든 슬롯에 대한 새 광고를 가져와 표시합니다.
예시
let slot1 = nestads.defineSlot(`${placementCode}`, [728, 90], `${divId}`);
nestads.display(`${divId}`);
// This call to refresh fetches a new ad for slot1 only.
nestads.pubAds().refresh([slot1]);
// This call to refresh fetches a new ad for each slot.
nestads.pubAds().refresh();
slots?: null |
Slot
[]
새로고침할 슬롯입니다.
슬롯을 지정하지 않으면 모든 슬롯이 새로고침됩니다.
setCentering
setCentering(centerAds: boolean): void
광고의 가로 가운데 맞춤을 사용 또는 사용 중지합니다
예시
nestads.pubAds().setCentering(true);
centerAds: boolean
광고를 중앙에 정렬하려면 true
하고, 왼쪽에 정렬하려면
false
하세요.
Last updated