File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/scramjet/packages/core/src/client/dom Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ export default function (client: ScramjetClient, self: typeof window) {
5757 return true ;
5858 } ,
5959
60+ has ( target , prop ) {
61+ return target . getItem ( client . url . host + "@" + ( prop as string ) ) !== null ;
62+ } ,
63+
6064 ownKeys ( target ) {
6165 return Reflect . ownKeys ( target )
6266 . filter ( ( f ) => typeof f === "string" && f . startsWith ( client . url . host ) )
@@ -66,6 +70,13 @@ export default function (client: ScramjetClient, self: typeof window) {
6670 } ,
6771
6872 getOwnPropertyDescriptor ( target , property ) {
73+ // TODO: probably not right
74+ if (
75+ target . getItem ( client . url . host + "@" + ( property as string ) ) === null
76+ ) {
77+ return undefined ;
78+ }
79+
6980 return {
7081 value : target . getItem ( client . url . host + "@" + ( property as string ) ) ,
7182 enumerable : true ,
You can’t perform that action at this time.
0 commit comments