Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TSS File function, with matching unit test. #233

Closed
wants to merge 2 commits into from
Closed

Add TSS File function, with matching unit test. #233

wants to merge 2 commits into from

Conversation

cxj
Copy link
Contributor

@cxj cxj commented Aug 25, 2020

Sometimes it's nice to separate Javascript used in partials from the template XML files themselves. This new function allows doing so safely without extra ceremony by letting a file's contents (e.g. the Javascript) be inserted into a targeted XML element, similar to the json function. (In fact, the code is just a modified version of the TSSFunction Json class.)

This is needed instead of the alternative template function, which interprets a file's contents as XML/HTML, and as a result corrupts pure Javascript.

cxj and others added 2 commits August 25, 2020 09:24
- Inserts the contents of a specified file into the targeted element.
- Example use: inserting inline, template-specific Javascript.
@cxj cxj closed this Oct 7, 2020
@cxj cxj deleted the master branch October 7, 2020 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant