MCPcopy Create free account
hub / github.com/reactjs/react-rails / run

Function run

lib/assets/javascripts/JSXTransformer.js:181–185  ·  view source on GitHub ↗

* Appends a script element at the end of the with the content of code, * after transforming it. * * @param {string} code The original source code * @param {string?} url Where the code came from. null if inline * @param {object?} options Options to pass to jstransform * @internal

(code, url, options)

Source from the content-addressed store, hash-verified

179 * @internal
180 */
181function run(code, url, options) {
182 var scriptEl = document.createElement('script');
183 scriptEl.text = transformCode(code, url, options);
184 headEl.appendChild(scriptEl);
185}
186
187/**
188 * Load script from the provided url and pass the content to the callback.

Callers 1

checkFunction · 0.85

Calls 1

transformCodeFunction · 0.85

Tested by

no test coverage detected