gpt4 book ai didi

javascript - PhantomJS 是否支持 ES6 为爬虫和机器人提供 angularjs 应用程序?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:27:24 25 4
gpt4 key购买 nike

我正在尝试使用 ajax-seo让 Angularjs 应用程序从 PhantomJS 网络服务器提供 html 编译内容。但它并没有呈现完整的页面。它只是给出以下响应

<html><head></head><body></body></html>

我已经很好地按照说明进行操作,但到目前为止运气不好。所以我想知道 PhantomJS 是否支持 ES6,因为我的应用程序是在 ES6 中。

最佳答案

PhantomJS 2.1.1 仅支持大约 10% 的 ECMAScript 6,这可能不足以正确呈现您的页面。

这是基于 https://kangax.github.io/compat-table/es6/ 的稍微更详细的结果:

Overall coverage: 10%> Array is subclassable: 0/11> Array static methods: 0/11> Array.prototype methods: 0/10> Date.prototype[Symbol.toPrimitive]: No> Function is subclassable: 0/6> HTML-style comments: Yes> Map: 0/19> Math methods: 1/17> Number properties: 0/7> Object static methods: 0/4> Object static methods accept primitives: 0/10> Object.prototype.__proto__: 6/6> Promise: 0/8> Promise is subclassable: 0/4> Proxy: 0/34> Proxy, internal 'defineProperty' calls: 0/2> Proxy, internal 'deleteProperty' calls: 0/6> Proxy, internal 'get' calls: 0/36> Proxy, internal 'getOwnPropertyDescriptor' calls: 0/4> Proxy, internal 'ownKeys' calls: 0/3> Proxy, internal 'set' calls: 0/11> Reflect: 0/20> RegExp "y" and "u" flags: 0/5> RegExp is subclassable: 0/4> RegExp syntax extensions: 8/8> RegExp.prototype properties: 0/6> RegExp.prototype.compile: Yes> Set: 0/19> String static methods: 0/2> String.prototype HTML methods: 3/3> String.prototype methods: 0/10> Symbol: 0/11> Unicode code point escapes: 0/2> WeakMap: 0/12> WeakSet: 0/11> __proto__ in object literals: 1/5> arrow functions: 0/13> block-level function declaration: No> class: 0/24> const: 1/16> default function parameters: 0/7> destructuring, assignment: 0/24> destructuring, declarations: 0/22> destructuring, parameters: 0/23> for..of loops: 0/9> function "name" property: 3/17> generators: 0/27> let: 0/12> miscellaneous: 2/10> miscellaneous subclassables: 0/6> new.target: 0/2> non-strict function semantics: 2/3> object literal extensions: 0/6> octal and binary literals: 0/4> own property order: 4/7> proper tail calls (tail call optimisation): 0/2> prototype of bound functions: 0/5> rest parameters: 0/5> spread (...) operator: 0/15> super: 0/8> template literals: 0/5> typed arrays: 19/46> well-known symbols: 0/26

Gist包含完整数据以及生成它的脚本。

关于javascript - PhantomJS 是否支持 ES6 为爬虫和机器人提供 angularjs 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37629774/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com