* Get the consent policy to follow. * @return {?string}
()
| 1883 | * @return {?string} |
| 1884 | */ |
| 1885 | getConsentPolicy_() { |
| 1886 | let policyId = this.getAttribute('data-block-on-consent'); |
| 1887 | if (policyId === null) { |
| 1888 | if (shouldBlockOnConsentByMeta(this)) { |
| 1889 | policyId = 'default'; |
| 1890 | this.setAttribute('data-block-on-consent', policyId); |
| 1891 | } else { |
| 1892 | // data-block-on-consent attribute not set |
| 1893 | return null; |
| 1894 | } |
| 1895 | } |
| 1896 | if (policyId == '' || policyId == 'default') { |
| 1897 | // data-block-on-consent value not set, up to individual element |
| 1898 | // Note: data-block-on-consent and data-block-on-consent='default' is |
| 1899 | // treated exactly the same |
| 1900 | return devAssert(this.impl_).getConsentPolicy(); |
| 1901 | } |
| 1902 | return policyId; |
| 1903 | } |
| 1904 | |
| 1905 | /** |
| 1906 | * Get the purpose consents that should be granted. |
no test coverage detected