Ok, I’ve managed to add local javascript files using theme’s description.xml by adding file-element with name-attribute.
But there is no documentation or examples on adding javascript that is located eg in src=“http://mycompany.org/scripts/poll.js”. I don’t want to copy that file to theme folder because that file gets frequent updates.