Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

V8 native syntax in Chrome

Nodejs has special flag --allow-natives-syntax. Is it possible to pass such thing to Google Chrome? Or maybe devtools provide some other way to access such information?

// running node with `--allow-natives-syntax` flag

var obj = { a: true, b: false };
console.log(%HasFastProperties(obj)); // true (Fast mode)
delete obj.a;
console.log(%HasFastProperties(obj)); // false (Dictionary mode)
like image 225
Qwertiy Avatar asked Sep 08 '26 00:09

Qwertiy


1 Answers

Yes, you can pass that flag to Google Chrome if you start Chrome with --js-flags="--allow-natives-syntax".

(I should point out that you should not generally run Chrome with that flag turned on; use it only for debugging of websites you trust.)

like image 163
jmrk Avatar answered Sep 10 '26 14:09

jmrk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!