当前位置: 首页 > news >正文

lol视频网站模板爱站工具包下载

lol视频网站模板,爱站工具包下载,wordpress目录关seo,网上注册公司申请流程之前测试了很多JS引擎#xff0c;都只支持es5语法#xff0c;不支持执行es6#xff0c;测试了下微软的V8反正能跑通#xff0c;应该是支持的。还得是微软呀。 如图#xff1a;安装相关包#xff1a; 这是参考的官方V8代码 using Microsoft.ClearScript.JavaScript; us…之前测试了很多JS引擎都只支持es5语法不支持执行es6测试了下微软的V8反正能跑通应该是支持的。还得是微软呀。 如图安装相关包 这是参考的官方V8代码 using Microsoft.ClearScript.JavaScript; using Microsoft.ClearScript.V8; using Microsoft.ClearScript; using System.Security.Cryptography;using (var engine new V8ScriptEngine()){// 指定JavaScript文件路径string filePath D:\test\CallJS\CallJS\test.js;// 读取JavaScript文件内容string javascriptCode File.ReadAllText(filePath);// expose a host typeengine.Execute(var window this;);engine.AddHostType(Console, typeof(Console));var type mp3;var mid 440613;var para $corpkuwop2p1typeconvert_url2sig0format{type}rid{mid};string str Console.WriteLine(encryptQuery(112233));string str1 Console.WriteLine(encryptQuery(para)).Replace(para, para);engine.Execute(javascriptCode C#有偿群927860652);engine.Execute(javascriptCode str1);engine.Execute(Console.WriteLine({0} is an interesting number., Math.PI));// expose a host objectengine.AddHostObject(random, new Random());engine.Execute(Console.WriteLine(random.NextDouble()));// expose entire assembliesengine.AddHostObject(lib, new HostTypeCollection(mscorlib, System.Core));engine.Execute(Console.WriteLine(lib.System.DateTime.Now));// create a host object from scriptengine.Execute(birthday new lib.System.DateTime(2007, 5, 22);Console.WriteLine(birthday.ToLongDateString()););// use a generic class from scriptengine.Execute(Dictionary lib.System.Collections.Generic.Dictionary;dict new Dictionary(lib.System.String, lib.System.Int32);dict.Add(foo, 123););// call a host method with an output parameterengine.AddHostObject(host, new HostFunctions());engine.Execute(intVar host.newVar(lib.System.Int32);found dict.TryGetValue(foo, intVar.out);Console.WriteLine({0} {1}, found, intVar););// create and populate a host arrayengine.Execute(numbers host.newArr(lib.System.Int32, 20);for (var i 0; i numbers.Length; i) { numbers[i] i; }Console.WriteLine(lib.System.String.Join(, , numbers)););// create a script delegateengine.Execute(Filter lib.System.Func(lib.System.Int32, lib.System.Boolean);oddFilter new Filter(function(value) {return (value 1) ? true : false;}););// use LINQ from scriptengine.Execute(oddNumbers numbers.Where(oddFilter);Console.WriteLine(lib.System.String.Join(, , oddNumbers)););// use a dynamic host objectengine.Execute(expando new lib.System.Dynamic.ExpandoObject();expando.foo 123;expando.bar qux;delete expando.foo;);// call a script functionengine.Execute(function print(x) { Console.WriteLine(x); });engine.Script.print(DateTime.Now.DayOfWeek);// examine a script objectengine.Execute(person { name: Fred, age: 5 });Console.WriteLine(engine.Script.person.name);// read a JavaScript typed arrayengine.Execute(values new Int32Array([1, 2, 3, 4, 5]));var values (ITypedArrayint)engine.Script.values;Console.WriteLine(string.Join(, , values.ToArray()));}稍微看下官网案例就知道怎么用了。 再记录下es6转es5步骤 1.npm执行以下命令 npm install -g babel-cli 安装babel 2.查看版本 babel --version 3.初始化项目 执行npm init -y 4.安装转换包 npm install --save-dev babel-preset-es2015 5.转为新es5语法文件 babel src -d dist 记得把要转换的文件放在项目根目录我把js文件放在根目录下的src文件夹中然后创建.babelrc配置文件在根目录中 内容如下 {presets: [es2015],plugins: [] }然后会在根目录生成新的dist文件夹es5版本的JS在里面。
http://www.dnsts.com.cn/news/45842.html

相关文章:

  • 百度网盘怎样做网站Wordpress教程推荐
  • 网站建设的基本步骤福州哪里做网站
  • 东莞网站建设建网站湖南响应式官网建设哪家好
  • 做dna胎儿亲子鉴定网站凉山建设网站
  • 网络营销企业网站推广深圳网站设计首选柚米
  • 网址查询网站名称沧州网站建设沧州
  • 创建空白网站wordpress思源字体
  • 用html5做商城网站怎么做网页设计与制作怎么弄
  • html做游戏网站免费做四年级题的网站
  • 成品网站1688入口网页版怎样网站群 米拓
  • 查网站空间商视频封面制作网站
  • 网站反链有好处吗做h5网站pc加手机版要多少钱
  • 做膜的网站有哪些主机开设成功 网站正在建设中
  • 网站改版 升级的目的是什么意思微信怎么弄小程序店铺
  • 杭州市网站建设网站 空间转移
  • 企业网站的维护网站建设需求方案
  • 常见的微网站平台有哪些沈阳网站制作全网性
  • 上海网站关键词优化淘客网站做的好的
  • 网站 模板 html网站上微信引流怎么做的
  • android手机软件开发教程专业搜索引擎seo服务商
  • 最新站群wordpress 返回顶部功能
  • 网站设计开发网站云南网站设计多少钱
  • 重庆博建设计院公司是网站连云港做网站最好
  • 常州云之家网站建设公司怎么样兰州网络公司网站
  • ps做网站主页图片网站忧化是干什么的
  • 网站建设可用性的五个方面wordpress仿导航大全
  • 福建省建住房建设部网站wordpress即时聊天插件
  • 石家庄手机网站建设如何安装wordpress的插件安装教程
  • 襄阳网站建设xytzg地产广告设计网站
  • 海外贸易在什么网站做wordpress 上传功能