Sha256: cb9428e57629b5a77209e3d4b48584d77a89c70195f63fbcea831d360dc4d785
Contents?: true
Size: 430 Bytes
Versions: 8
Compression:
Stored size: 430 Bytes
Contents
import { Controller } from "stimulus"; export default class EditPageController extends Controller { static get targets() { return ["form"]; } preview() { const form = this.formTarget; const prevAction = form.action; const prevTarget = form.target; form.target = "_blank"; form.action = form.dataset.previewUrl; form.submit(); form.action = prevAction; form.target = prevTarget; } }
Version data entries
8 entries across 8 versions & 1 rubygems