Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lcc-shape
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wangmingming
lcc-shape
Commits
5ca8f28f
Commit
5ca8f28f
authored
Aug 03, 2023
by
wangmingming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
333
parent
fd388530
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6418 additions
and
4800 deletions
+6418
-4800
js_dom_run.js
js_dom_run.js
+3199
-19
Window.js
jsdom/lib/jsdom/browser/Window.js
+2
-2
Navigator.js
jsdom/lib/jsdom/living/generated/Navigator.js
+1
-0
Screen.js
jsdom/lib/jsdom/living/generated/Screen.js
+193
-113
Navigator-impl.js
jsdom/lib/jsdom/living/navigator/Navigator-impl.js
+1
-0
NavigatorID-impl.js
jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js
+15
-0
Screen-impl.js
jsdom/lib/jsdom/living/window/Screen-impl.js
+7
-0
src_out.js
src_out.js
+3000
-4666
No files found.
js_dom_run.js
View file @
5ca8f28f
This diff is collapsed.
Click to expand it.
jsdom/lib/jsdom/browser/Window.js
View file @
5ca8f28f
...
...
@@ -3,7 +3,7 @@ let proxy = function (tt, name) {
get
(
target
,
p
,
receiver
)
{
let
res
=
Reflect
.
get
(
target
,
p
,
receiver
);
console
.
log
(
`
${
name
}
get`
,
p
,
typeof
res
)
if
(
!
[
'_registeredHandlers'
,
'window'
,
'_currentEvent'
,
'_eventListenerss'
].
includes
(
p
)
&&
res
&&
typeof
res
===
'object'
&&
typeof
p
!==
'symbol'
)
{
if
(
!
[
'_registeredHandlers'
,
'window'
,
'_currentEvent'
,
'_eventListenerss'
,
'JSON'
,
'Math'
,
'JSON'
].
includes
(
p
)
&&
res
&&
typeof
res
===
'object'
&&
typeof
p
!==
'symbol'
)
{
return
proxy
(
res
,
`
${
name
}
.
${
p
}
`
)
}
return
res
;
...
...
@@ -274,7 +274,7 @@ function Window(options) {
// }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if
(
!
[
'_registeredHandlers'
,
'window'
,
'_currentEvent'
,
'performance'
,
'debug'
,
'_eventListenerss'
,
'top'
].
includes
(
p
)
&&
res
&&
typeof
res
===
'object'
&&
typeof
p
!==
'symbol'
)
{
if
(
!
[
'_registeredHandlers'
,
'window'
,
'_currentEvent'
,
'performance'
,
'debug'
,
'_eventListenerss'
,
'top'
,
'JSON'
,
'Math'
].
includes
(
p
)
&&
res
&&
typeof
res
===
'object'
&&
typeof
p
!==
'symbol'
)
{
return
proxy
(
res
,
p
)
}
return
res
;
...
...
jsdom/lib/jsdom/living/generated/Navigator.js
View file @
5ca8f28f
...
...
@@ -274,6 +274,7 @@ exports.install = (globalObject, globalNames) => {
}
get
userAgent
()
{
return
window
.
fingerprint
.
navigator
.
userAgent
;
const
esValue
=
this
!==
null
&&
this
!==
undefined
?
this
:
globalObject
;
if
(
!
exports
.
is
(
esValue
))
{
...
...
jsdom/lib/jsdom/living/generated/Screen.js
View file @
5ca8f28f
This diff is collapsed.
Click to expand it.
jsdom/lib/jsdom/living/navigator/Navigator-impl.js
View file @
5ca8f28f
...
...
@@ -13,6 +13,7 @@ class NavigatorImpl {
constructor
(
globalObject
,
args
,
privateData
)
{
this
.
_globalObject
=
globalObject
;
this
.
userAgent
=
privateData
.
userAgent
;
// this.userAgent = window.fingerprint.navigator.userAgent;
this
.
languages
=
Object
.
freeze
([
"en-US"
,
"en"
]);
this
.
plugins
=
PluginArray
.
create
(
this
.
_globalObject
);
this
.
mimeTypes
=
MimeTypeArray
.
create
(
this
.
_globalObject
);
...
...
jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js
View file @
5ca8f28f
...
...
@@ -2,36 +2,51 @@
exports
.
implementation
=
class
NavigatorIDImpl
{
get
appCodeName
()
{
return
window
.
fingerprint
.
navigator
.
appCodeName
return
"Mozilla"
;
}
get
appName
()
{
return
window
.
fingerprint
.
navigator
.
appName
return
"Netscape"
;
}
get
appVersion
()
{
return
window
.
fingerprint
.
navigator
.
appVersion
return
"4.0"
;
}
get
platform
()
{
return
window
.
fingerprint
.
navigator
.
platform
return
""
;
}
get
product
()
{
return
window
.
fingerprint
.
navigator
.
product
return
"Gecko"
;
}
get
productSub
()
{
return
window
.
fingerprint
.
navigator
.
productSub
return
"20030107"
;
}
// see Navigator constructor for userAgent
get
vendor
()
{
return
window
.
fingerprint
.
navigator
.
vendor
return
"Apple Computer, Inc."
;
}
get
vendorSub
()
{
return
window
.
fingerprint
.
navigator
.
vendorSub
return
""
;
}
};
jsdom/lib/jsdom/living/window/Screen-impl.js
View file @
5ca8f28f
...
...
@@ -10,4 +10,11 @@ ScreenImpl.prototype.height = 0;
ScreenImpl
.
prototype
.
colorDepth
=
24
;
ScreenImpl
.
prototype
.
pixelDepth
=
24
;
// ScreenImpl.prototype.availWidth = window.fingerprint.screen.availWidth;
// ScreenImpl.prototype.availHeight = window.fingerprint.screen.availHeight;
// ScreenImpl.prototype.width = window.fingerprint.screen.width;
// ScreenImpl.prototype.height = window.fingerprint.screen.height;
// ScreenImpl.prototype.colorDepth = window.fingerprint.screen.colorDepth;
// ScreenImpl.prototype.pixelDepth = window.fingerprint.screen.pixelDepth;
exports
.
implementation
=
ScreenImpl
;
src_out.js
View file @
5ca8f28f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment