There is a sample that implements a <ruby-script>tag via HTML custom elements API.
I would like to build this in, as it's a natural way to use Ruby instead of JavaScript in the browser (much better than using JavaScript to ruby ruby(my_script)).
The holdup so far is that I'm running the javascript for content scripts in RenderProcessHandler::OnContextCreated. The DOM is not ready at this point, and so some of the custom elements API calls will fail or have no effect.
There must be another callback in the handler that gets hit after the DOM is ready... just need to inject the code at the right time.
There is a sample that implements a
<ruby-script>
tag via HTML custom elements API.I would like to build this in, as it's a natural way to use Ruby instead of JavaScript in the browser (much better than using JavaScript to ruby
ruby(my_script)
).The holdup so far is that I'm running the javascript for content scripts in RenderProcessHandler::OnContextCreated. The DOM is not ready at this point, and so some of the custom elements API calls will fail or have no effect.
There must be another callback in the handler that gets hit after the DOM is ready... just need to inject the code at the right time.