对于内嵌了 Internet Explorer 控件的应用程序,有两种方式可以决定默认的 IE 渲染模式(IE版本)。


一、在页面中指定

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

IE= 后面的值可选项为:7,8,9,10,11/Edge


二、通过以下注册表设置来确定默认的 IE 渲染模式(IE版本)。

一般设置为 11001 (0x2AF9),即 Internet Explorer 11 Edge 模式。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"mshta.exe"=dword:00002af9


如果页面中有 X-UA-Compatible,则以页面设置为准。

如果页面中没有 X-UA-Compatible,则以注册表设置为准(注意64位模式下,注册表路径中没有 Wow6432Node)。


参考资料:

X-UA-Compatibility Meta Tag and HTTP Response Header

https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-iedoco/380e2488-f5eb-4457-a07a-0cb1b6e4b4b5


Internet Feature Controls

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN



本文链接地址: Internet Explorer 控件及 mshta.exe 的 渲染模式(IE版本)
https://blog.qingfengju.com/index.asp?id=446

分类:Web开发 查看次数:921 发布时间:2021/12/9 23:04:09

本文在上一篇的基础上,增加了生成html文件的功能。

webpack默认不能处理html文件,需要安装插件。

npm install html-webpack-plugin --save-dev


增加的配置项见:webpack.config.js

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    mode: 'production',//模式:production/development
    entry: './src/index.js',//入口文件
    output: {
        filename: 'main.js',//打包后的文件名
        path: path.resolve(__dirname,'./dist'),//目标文件夹绝对路径
        clean: true //打包前先清理dist文件夹
    },
    plugins: [
        new HtmlWebpackPlugin({
			template: './public/index.html',//模板html文件
			filename: 'index.html',//生成的html文件名
			inject: 'body' //生成是script标签位置
        })
    ]
}

参考文档:https://webpack.docschina.org/plugins/html-webpack-plugin/



本文链接地址: webpack 2: 打包带html的项目
https://blog.qingfengju.com/index.asp?id=445

分类:Web开发 查看次数:1402 发布时间:2021/11/29 22:06:02