* Returns an optional placeholder element for this custom element. * @return {?Element} * @package @final
()
| 1918 | * @package @final |
| 1919 | */ |
| 1920 | getPlaceholder() { |
| 1921 | return query.lastChildElement(this, (el) => { |
| 1922 | return ( |
| 1923 | el.hasAttribute('placeholder') && |
| 1924 | // Denylist elements that has a native placeholder property |
| 1925 | // like input and textarea. These are not allowed to be AMP |
| 1926 | // placeholders. |
| 1927 | !isInputPlaceholder(el) |
| 1928 | ); |
| 1929 | }); |
| 1930 | } |
| 1931 | |
| 1932 | /** |
| 1933 | * Hides or shows the placeholder, if available. |
no test coverage detected