Internet Explorer 支持被删除
Internet Explorer Support got Dropped
一天又一天,我的 React 应用程序不再在 Internet Explorer 上运行
它在 Google Chrome,
上非常有效
我试图在 React index.js 目录的索引页上提醒用户,但代码甚至在到达 index.js
之前就中断了
有什么想法吗?
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
console.log("first"); <---- this never runs
alert(navigator.userAgent);
ReactDOM.render(<App />, document.getElementById("root"));
从 Internet Explorer 调试
var n=window.location.href
所以 Internet Explorer 世界末日正在到处发生...
将其放在 public/index.html 中的标记之后,让用户知道要升级
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.onload = function () {
var browserCheck = navigator.userAgent.indexOf("Trident");
if (browserCheck !== -1) {
alert(
"go get google chrome foo"
);
}
};
</script>
一天又一天,我的 React 应用程序不再在 Internet Explorer 上运行
它在 Google Chrome,
上非常有效我试图在 React index.js 目录的索引页上提醒用户,但代码甚至在到达 index.js
之前就中断了有什么想法吗?
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
console.log("first"); <---- this never runs
alert(navigator.userAgent);
ReactDOM.render(<App />, document.getElementById("root"));
从 Internet Explorer 调试
var n=window.location.href
所以 Internet Explorer 世界末日正在到处发生...
将其放在 public/index.html 中的标记之后,让用户知道要升级
<!DOCTYPE html>
<html lang="en">
<head>
<script>
window.onload = function () {
var browserCheck = navigator.userAgent.indexOf("Trident");
if (browserCheck !== -1) {
alert(
"go get google chrome foo"
);
}
};
</script>