rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 193 forks source link

How to load jQuery source code #401

Closed simcookies closed 8 years ago

simcookies commented 8 years ago

I want to write test foe some js function, but it need jquery, so If can I load jquery sorce code directly? Like this: cxt.load("XXXX/jquery.min.js") It seems errors come out: V8::Error: Cannot call method 'createElement' of undefined

cowboyd commented 8 years ago

The Ruby Racer does not provide a browser environment or a DOM API, those are the responsibility of the embedder. It is just javascript.