@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | if (!empty($statements)) { |
53 | 53 | $content = sprintf('(function(){var elem = document.querySelector(\'[data-wc="%s"]\');%s}());if(document.currentScript)document.currentScript.parentNode.removeChild(document.currentScript);', $id, join('', $statements)); |
54 | - $this->scriptBlock($content, [ 'block' => 'scriptsComponents' ]); |
|
54 | + $this->scriptBlock($content, ['block' => 'scriptsComponents']); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return trim(sprintf('data-wc="%s" %s', $id, join(' ', $attributes))); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function is(string $tagName, array $properties = array(), string $scriptPath = ''): string |
69 | 69 | { |
70 | 70 | if (!empty($scriptPath)) { |
71 | - $this->script($scriptPath, [ 'block' => 'scriptsComponents' ]); |
|
71 | + $this->script($scriptPath, ['block' => 'scriptsComponents']); |
|
72 | 72 | } |
73 | 73 | return trim(sprintf('is="%s" %s', $tagName, $this->props($properties))); |
74 | 74 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | public function element(string $tagName, array $properties = array(), $scriptPath = ''): string |
85 | 85 | { |
86 | 86 | if (!empty($scriptPath)) { |
87 | - $this->script($scriptPath, [ 'block' => 'scriptsComponents' ]); |
|
87 | + $this->script($scriptPath, ['block' => 'scriptsComponents']); |
|
88 | 88 | } |
89 | 89 | return trim(sprintf('<%s %s></%s>', $tagName, $this->props($properties), $tagName)); |
90 | 90 | } |