Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A minimal reproduction case for a weird IE11 memory leak
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script crossorigin src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script>
(function () {
var doc = document;
function unused() {
doc.createElement();
}
Math.easeInOutSine = function () {
return 0;
};
})()
</script>
</head>
<body class="assemble_views-scope">
<div id="mount-nav-bar"></div>
<script crossorigin src="https://cdnjs.cloudflare.com/ajax/libs/react/16.4.2/umd/react.production.min.js"></script>
<script crossorigin src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.4.2/umd/react-dom.production.min.js"></script>
<script>
function CompanyProjectPicker(props) {
return React.createElement(
'div',
{},
React.createElement('input'),
props.projects.map(function (item, idx) {
return React.createElement(
'li',
{
key: 'item-' + idx,
className: "some_really_really_reeealllyyy_looooong_string"
},
React.createElement(
'a',
{
className: ['', "some_really_really_reeealllyyy_looooong_string", ''].join(' '),
href: '/set_project/123'
},
'test project'
)
);
})
);
}
function renderNav() {
var availableProjects = [];
for (var i = 1; i <= 40000; i++) {
availableProjects.push({})
}
var mount = document.getElementById('mount-nav-bar');
var nav = React.createElement(CompanyProjectPicker, {
projects: availableProjects
})
return ReactDOM.render(nav, mount);
};
renderNav();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.