Passing <content> to a helper

In a stache template one can use the <content></content> tags to render the contents contained within the component’s tags.

Is it possible to pass the contents to a helper as an argument or perhaps pass the contents to the viewModel?

Yes, via a section helper.

{{#if displayModal}}
  <section class="modal-frame">
    <div class="backdrop" ($click)="attr('displayModal', false)"></div>
    <div class="popover-frame">
  tag: 'popover-modal',
  template: template,
  leakScope: false,
  viewModel: {
    define: {
      displayModal: {
        value: false,
        type: 'boolean'
      embed: {
        type: can.$
  events: {
    '{scope} embed': function( scope, ev, newEl, oldEl ) {
      if (newEl) {

      if (oldEl) {
    destroy: function() {
      var embed = this.scope.attr('embed');

      if (embed) {
  helpers: {
    detach: function( options ) {
      this.attr('embed', options.fn().childNodes);
      return options.inverse();