<body> <div id="test-div"></div> <script> var testDiv = document.getElementById("test-div"); if (testDiv.myCustomProperty) myConsole.log("ERROR: found myCustomProperty."); else didCompleteTestSuccessfully(); </script> </body>