JavaScript compatibility script for html placeholder attribute