You are here

protected function BlazyFilter::removeNodes in Blazy 8.2

Removes nodes.

2 calls to BlazyFilter::removeNodes()
BlazyFilter::buildGrid in src/Plugin/Filter/BlazyFilter.php
Build the grid.
BlazyFilter::cleanupNodes in src/Plugin/Filter/BlazyFilter.php
Cleanups invalid nodes or those of which their contents are moved.

File

src/Plugin/Filter/BlazyFilter.php, line 611

Class

BlazyFilter
Provides a filter to lazyload image, or iframe elements.

Namespace

Drupal\blazy\Plugin\Filter

Code

protected function removeNodes($nodes) {
  foreach ($nodes as $node) {
    if ($node->parentNode) {
      $node->parentNode
        ->removeChild($node);
    }
  }
}