After adding the following code to the end of the Google custom search script, I encountered an issue:
window.onload = function(){
document.getElementById('gsc-i-id1').placeholder = 'Search';
};
Although this code successfully added the placeholder text "Search" to the search box in all major browsers, it did not work in Microsoft Edge.
Microsoft Edge displayed the following error message:
SCRIPT5007: Unable to set property "placeholder" of undefined or null reference.
Despite attempting several fixes, I was unable to resolve the issue...
UPDATE: I have found a temporary solution to this bug until Microsoft addresses it:
setTimeout(function(){
document.getElementById('gsc-i-id1').placeholder = 'Search';
}, 500);