JQuery in V8;

878 views
Skip to first unread message

Chinnu

unread,
Jun 21, 2011, 3:11:15 PM6/21/11
to v8-users
Hi,

Is it possible to compile and run a script in JQuery syntax in V8
engine? For example, can we run something like the following in V8?

$(document).ready(function() {

$('body').append('<iframe src="http://sampleurl.com"></
iframe>');
});


I'm interested in getting the iframe source above. I have a program
that hooks into V8 to handle some DOM callbacks (like document.write,
etc.). I was wondering if it would be possible to handle the JQuery
syntax.

Please suggest.

Thank you,
Ravi

Marcel Laverdet

unread,
Jun 21, 2011, 3:16:40 PM6/21/11
to v8-u...@googlegroups.com

Fabio Kaminski

unread,
Jun 21, 2011, 11:08:36 PM6/21/11
to v8-u...@googlegroups.com
the DOM its not part of the "vanilla" js engine.. could'nt you just
use the developer console of chrome?

Chinnu

unread,
Jun 22, 2011, 10:44:03 AM6/22/11
to v8-users

Thank you for the reply. So, you're suggesting checking the Chrome
source code to see how they're dealing with jquery syntax?

Thanks,
Ravi


On Jun 21, 11:08 pm, Fabio Kaminski <fabiokamin...@gmail.com> wrote:
> the DOM its not part of the "vanilla" js engine.. could'nt you just
> use the developer console of chrome?
>
>
>
>
>
>
>
> On Tue, Jun 21, 2011 at 4:16 PM, Marcel Laverdet <mar...@laverdet.com> wrote:
> > Please look into "jsdom":
> >https://github.com/tmpvar/jsdom
>

Vyacheslav Egorov

unread,
Jun 22, 2011, 10:51:38 AM6/22/11
to v8-u...@googlegroups.com
Hi Ravi,

There is no such thing as "jQuery syntax". It's just a valid
JavaScript program. jQuery simply declares a global function called $.

If you want to get jQuery functionality in you program then you should
either embed jQuery into your program or implement the same feature
from scratch.

--
Vyacheslav Egorov

Fabio Kaminski

unread,
Jun 23, 2011, 9:32:49 PM6/23/11
to v8-u...@googlegroups.com
> Thank you for the reply. So, you're suggesting checking the Chrome
> source code to see how they're dealing with jquery syntax?

Hi Ravi,

No, actually if i understand your problem well, you need a javascript
console with the DOM.. and load scripts , like jquery.. or something
else..
and play with them in real time.. if i assuming this right.. if you
use the developer tools..of the baked chrome browser.. in :
tools>javascript console..

is all you need... or using firebug in firefox..

Reply all
Reply to author
Forward
0 new messages