Inferno 7.4.8, TypeError: n.getFlagsForElementVnode is not a function
iambumblehead opened this issue · comments
iambumblehead commented
Using inferno from a CDN results in this error TypeError: n.getFlagsForElementVnode is not a function
<script src="https://unpkg.com/inferno-hyperscript@7.4.8/dist/inferno-hyperscript.js"></script>
<script src="https://unpkg.com/inferno-hyperscript@7.4.8/dist/inferno-hyperscript.min.js"></script>
const { h, render } = window.Inferno;
window.onload = () => {
render( h( 'div', 'hello!' ), document.body );
// Uncaught TypeError: n.getFlagsForElementVnode is not a function
};
Sampo Kivistö commented
I tested this and its working as expected. Did you remember to load inferno script in your html file?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>inferno</title>
<script src="https://unpkg.com/inferno@7.4.8/dist/inferno.js"></script>
<script src="https://unpkg.com/inferno-hyperscript@7.4.8/dist/inferno-hyperscript.js"></script>
</head>
<body>
</body>
<script>
const { h, render } = window.Inferno;
window.onload = () => {
render( h( 'div', 'hello!' ), document.body );
};
</script>
</html>
iambumblehead commented
@Havunen thank you and I'm sorry if I've wasted your time here -- I think you are right and I will try it out in a moment and let you know how it goes
iambumblehead commented
@Havunen yes my attempt was wrong -- everything is working thank you