JS问题:关于getAttribute()返回null的问题?不好意思,问题看得不够仔细,特意去翻了下MDN。当指定的属...
Browser compatibility letnonce=script.getAttribute("nonce");// returns empty string Instead of retrieving the nonce from the content attribute, use thenonceproperty: js letnonce=script.nonce; Specifications Specification DOM #ref-for-dom-element-getattribute①...
js letnonce=script.nonce; Specifications Specification DOM #ref-for-dom-element-getattribute① Report problems with this compatibility data on GitHub desktopmobile Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android
Browser compatibility letnonce=script.getAttribute("nonce");// returns empty string Instead of retrieving the nonce from the content attribute, use thenonceproperty: js letnonce=script.nonce; Specifications Specification DOM #ref-for-dom-element-getattribute①...