API attach files question

I’m not sure if the api supports this but I want to add files just before the closing body tag using the api.

I’m familiar with this resource function:

window.webkit.messageHandlers.resource.postMessage(‘{“action”:“add”,“name”:“script.min.js”}’);

But that only adds files to the head of the document afaik.

I can add files to the editarea using the api but not outside that. I can move the files at load using .js but I’d like to know how others are handling this.

For small things it’s okay to leave the <script tags up in the body, but I prefer to have them lower most of the time.

Thoughts?

1 Like