Skip to content

Deprecation: script template helpers

Taylor Hunt edited this page Jul 30, 2019 · 3 revisions

Deprecate <script template-helpers> and <script marko-init>

Old:

<script template-helpers>
   function sum(a, b) {
      return a + b;
   }
</script>

<div>The sum of 1 + 2 is ${sum(1, 2)}</div>

New:

static function sum(a, b) {
   return a + b;
}

<div>The sum of 1 + 2 is ${sum(1, 2)}</div>

For more information, check out issue #547.