Sha256: 568f476a3877d10a09e5b82fa959ff4b7e8d254d6889649531e87bf5bf2e1f44
Contents?: true
Size: 690 Bytes
Versions: 17
Compression:
Stored size: 690 Bytes
Contents
# frozen_string_literal: true module Katalyst module GOVUK module Formbuilder module Frontend # rubocop:disable Rails/OutputSafety def govuk_formbuilder_init tag.script type: "module", nonce: request.content_security_policy_nonce do <<~JS.html_safe document.body.classList.toggle("js-enabled", true); document.body.classList.toggle("govuk-frontend-supported", ('noModule' in HTMLScriptElement.prototype)); import {initAll} from "@katalyst/govuk-formbuilder"; initAll(); JS end end # rubocop:enable Rails/OutputSafety end end end end
Version data entries
17 entries across 17 versions & 1 rubygems