commit
This commit is contained in:
@@ -95,7 +95,7 @@ l
|
|||||||
<script>
|
<script>
|
||||||
// 安全地冻结 Object.prototype(跳过不可配置属性)
|
// 安全地冻结 Object.prototype(跳过不可配置属性)
|
||||||
(function () {
|
(function () {
|
||||||
const badKeys = ['__proto__', 'constructor', 'prototype'];
|
const badKeys = ['constructor', 'prototype'];
|
||||||
for (const key of badKeys) {
|
for (const key of badKeys) {
|
||||||
if (key in Object.prototype) {
|
if (key in Object.prototype) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<script>
|
<script>
|
||||||
// 安全地冻结 Object.prototype(跳过不可配置属性)
|
// 安全地冻结 Object.prototype(跳过不可配置属性)
|
||||||
(function () {
|
(function () {
|
||||||
const badKeys = ['__proto__', 'constructor', 'prototype'];
|
const badKeys = ['constructor', 'prototype'];
|
||||||
for (const key of badKeys) {
|
for (const key of badKeys) {
|
||||||
if (key in Object.prototype) {
|
if (key in Object.prototype) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user