diff --git a/lib/Element.js b/lib/Element.js index cc2f525..0b481d2 100644 --- a/lib/Element.js +++ b/lib/Element.js @@ -1101,8 +1101,8 @@ AttributesArray.prototype = Object.create(NamedNodeMap.prototype, { // We can't make direct array access work (without Proxies, node >=6) // but we can make `Array.from(node.attributes)` and for-of loops work. -if (global.Symbol && global.Symbol.iterator) { - AttributesArray.prototype[global.Symbol.iterator] = function() { +if (globalThis.Symbol?.iterator) { + AttributesArray.prototype[globalThis.Symbol.iterator] = function() { var i=0, n=this.length, self=this; return { next: function() { diff --git a/lib/config.js b/lib/config.js index abd3475..559a847 100644 --- a/lib/config.js +++ b/lib/config.js @@ -4,4 +4,4 @@ * you call `require("domino")`. */ -exports.isApiWritable = !global.__domino_frozen__; +exports.isApiWritable = !globalThis.__domino_frozen__;