Sha256: e7baf8114e1331456db2408495b583937b55e00eb18a5f8899ea462edef6f59f

Contents?: true

Size: 331 Bytes

Versions: 4

Compression:

Stored size: 331 Bytes

Contents

import ApplicationController from './application_controller'

export default class extends ApplicationController {
  connect () {
    this.element.addEventListener('turbo:before-fetch-request', this.addTrestleModalHeader)
  }

  addTrestleModalHeader (event) {
    event.detail.fetchOptions.headers['X-Trestle-Modal'] = true
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trestle-0.10.1 frontend/js/controllers/modal_frame_controller.js
trestle-0.10.0 frontend/js/controllers/modal_frame_controller.js
trestle-0.10.0.pre2 frontend/js/controllers/modal_frame_controller.js
trestle-0.10.0.pre frontend/js/controllers/modal_frame_controller.js