Skip to content

Commit

Permalink
Merge pull request #984 from keuby/fix-iframe-sandbox
Browse files Browse the repository at this point in the history
fix: iframe sandbox element scope error
  • Loading branch information
bailicangdu authored Dec 4, 2023
2 parents 17ca435 + 0fc2100 commit e970ad1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sandbox/iframe/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
logWarn,
isUniqueElement,
isInvalidQuerySelectorKey,
throttleDeferForSetAppName,
} from '../../libs/utils'
import globalEnv from '../../libs/global_env'
import bindFunctionToRawTarget from '../bind_function'
Expand Down Expand Up @@ -256,7 +257,10 @@ function patchDocumentProperty (
rawDefineProperty(microDocument, tagName, {
enumerable: true,
configurable: true,
get: () => rawDocument[tagName],
get: () => {
throttleDeferForSetAppName(appName)
return rawDocument[tagName]
},
set: (value: unknown) => { rawDocument[tagName] = value },
})
})
Expand Down

0 comments on commit e970ad1

Please sign in to comment.