Script tag doesn't work on kintone?

Hi there!

I try to use script tags on Customize view like this.

  1. <div id=“abc”></div>
  2. <script>alert(“foo”)</script>

but there was no alert…

so script tag doesn’t work on kintone?

Hello Masa!

The script tag just cannot be used at the Custom View page. Alternatively, you can just write the script part in a js file and upload it at the JavaScript and CSS Customization.

Hi Yuzo Arai!

>The script tag just cannot be used at the Custom View page.

umm… OK sure!
No errors are showing in the Chrome Javascript Console, so I was little confused…

Thank you!

A related issue:

I’m attempting to instantiate Vue.js in a custom view to add data reactivity.

I need to bind the Vue instance to the id of an HTML element, which creates makes that element Vue’s root component.

However, the HTML in the custom view runs after my Javascript and CSS Customization.

So it seems Vue’s root component (an HTML div that I created in the custom view) doesn’t exist at the time that Vue is run in my Javascript and CSS Customization. Nothing happens.

Any suggestions on how to bind Vue to a root component in a custom view? I tried a <script> tag but, as the above commenter mentioned, <script> tags don’t work in the custom view page.

Figured this out:

To wait until the DOM is loaded before running the code, without using jQuery, I can use:

document.addEventListener("DOMContentLoaded", function(event) { 
  //do work

(available on 98% of browsers; not IE8 though…although Kintone supports IE11 and onward, so it’s not a problem here)

See for more details


Hello Nim

I suggest using “” in your case.

DOM structures may change from time to time in kintone so I would not recommend using it.