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
da3e5006
Commit
da3e5006
authored
Aug 31, 2023
by
wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
环境兼容
parent
0090b5d3
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
77 deletions
+77
-77
jetblue.py
jetblue.py
+1
-1
js_dom_run.js
js_dom_run.js
+23
-30
Window.js
jsdom/lib/jsdom/browser/Window.js
+31
-31
Navigator.js
jsdom/lib/jsdom/living/generated/Navigator.js
+11
-11
MimeTypeArray-impl.js
jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js
+4
-0
PluginArray-impl.js
jsdom/lib/jsdom/living/navigator/PluginArray-impl.js
+2
-0
HTMLCanvasElement-impl.js
jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
+3
-1
sss.js
sss.js
+2
-3
No files found.
jetblue.py
View file @
da3e5006
...
...
@@ -68,7 +68,7 @@ for i in range(100):
# }
headers
.
update
(
r
)
print
(
f
'{(time.time() - t1) *1000:.3f}ms'
,
len
(
headers
[
'X-1ItxWO9i-a'
.
lower
()]))
print
(
f
'{(time.time() - t1) *1000:.3f}ms'
,
len
(
headers
[
'X-1ItxWO9i-a'
.
lower
()]))
print
(
selectId
,
headers
[
'user-agent'
])
url
=
"https://jbrest.jetblue.com/lfs-rwb/outboundLFS"
data
=
{
...
...
js_dom_run.js
View file @
da3e5006
This diff is collapsed.
Click to expand it.
jsdom/lib/jsdom/browser/Window.js
View file @
da3e5006
...
...
@@ -259,37 +259,37 @@ function Window(options) {
// vm initialization is deferred until script processing is activated
this
.
_globalProxy
=
this
;
this
.
_globalProxy
=
new
Proxy
(
this
.
_globalProxy
,
{
get
(
target
,
p
,
receiver
)
{
// if (p === 'addEventListener'){
// debugger;
// }
let
res
=
Reflect
.
get
(
target
,
p
,
receiver
);
if
(
!
[
'Object'
,
'Window'
,
'debug'
,
'Math'
,
'Array'
,
'_random'
].
includes
(
p
)){
console
.
log
(
'window get'
,
p
,
typeof
res
)
}
// if (p === 'StyleSheet'){
// debugger;
// }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if
(
!
[
'_registeredHandlers'
,
'window'
,
'_currentEvent'
,
'debug'
,
'_eventListenerss'
,
'JSON'
,
'Math'
].
includes
(
p
)
&&
res
&&
typeof
res
===
'object'
&&
typeof
p
!==
'symbol'
)
{
return
proxy
(
res
,
p
)
}
return
res
;
},
// set(target, p, newValue, receiver) {
// console.log('set window', p, newValue)
// if (typeof newValue === 'string' && newValue.startsWith('3g')) {
// _console(newValue)
// // process.exit(0)
// }
// return Reflect.set(target, p, newValue, receiver)
// }
})
//
this._globalProxy = new Proxy(this._globalProxy, {
//
get(target, p, receiver) {
//
// if (p === 'addEventListener'){
//
// debugger;
//
// }
//
let res = Reflect.get(target, p, receiver);
//
if (!['Object','Window' , 'debug','Math', 'Array', '_random'].includes(p)){
//
console.log('window get', p, typeof res)
//
//
}
//
// if (p === 'StyleSheet'){
//
// debugger;
//
// }
//
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
//
//
if (
//
!['_registeredHandlers', 'window', '_currentEvent','debug','_eventListenerss','JSON', 'Math'].includes(p) &&
//
res && typeof res === 'object' && typeof p !== 'symbol') {
//
return proxy(res, p)
//
}
//
return res;
//
},
//
// set(target, p, newValue, receiver) {
//
// console.log('set window', p, newValue)
//
// if (typeof newValue === 'string' && newValue.startsWith('3g')) {
//
// _console(newValue)
//
// // process.exit(0)
//
// }
//
// return Reflect.set(target, p, newValue, receiver)
//
// }
//
})
Object
.
defineProperty
(
idlUtils
.
implForWrapper
(
this
),
idlUtils
.
wrapperSymbol
,
{
get
:
()
=>
this
.
_globalProxy
});
// List options explicitly to be clear which are passed through
...
...
jsdom/lib/jsdom/living/generated/Navigator.js
View file @
da3e5006
...
...
@@ -105,7 +105,7 @@ exports.install = (globalObject, globalNames) => {
class
MimeTypeArray
{
get
length
()
{
return
2
;
return
window
.
ENV
.
mimetypes
.
length
;
}
item
()
{
...
...
@@ -672,16 +672,16 @@ exports.install = (globalObject, globalNames) => {
return
utils
.
tryWrapperForImpl
(
esValue
[
implSymbol
][
"mimeTypes"
]);
});
res
=
new
MimeTypeArray
();
res
[
'0'
]
=
{
suffixes
:
'pdf'
,
type
:
"application/pdf"
,
enabledPlugin
:
{
filename
:
"internal-pdf-viewer"
}
}
res
[
'1'
]
=
{
"suffixes"
:
"pdf"
,
"type"
:
"text/pdf"
,
"enabledPlugin"
:{
"filename"
:
"internal-pdf-viewer"
}}
res
[
'application/pdf'
]
=
{
"suffixes"
:
"pdf"
,
"type"
:
"application/pdf"
,
"enabledPlugin"
:{
"filename"
:
"internal-pdf-viewer"
}}
res
[
'text/pdf'
]
=
{
"suffixes"
:
"pdf"
,
"type"
:
"text/pdf"
,
"enabledPlugin"
:{
"filename"
:
"internal-pdf-viewer"
}}
//
res['0'] = {
//
suffixes:'pdf',
//
type: "application/pdf",
//
enabledPlugin: {
//
filename: "internal-pdf-viewer"
//
}
//
}
//
res['1'] ={"suffixes":"pdf","type":"text/pdf","enabledPlugin":{"filename":"internal-pdf-viewer"}}
//
res['application/pdf'] = {"suffixes":"pdf","type":"application/pdf","enabledPlugin":{"filename":"internal-pdf-viewer"}}
//
res['text/pdf'] = {"suffixes":"pdf","type":"text/pdf","enabledPlugin":{"filename":"internal-pdf-viewer"}}
return
res
// return proxy(res, 'mimeTypes')
}
...
...
jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js
View file @
da3e5006
...
...
@@ -7,10 +7,14 @@ let mims = {
}
exports
.
implementation
=
class
MimeTypeArray
{
get
length
()
{
console
.
log
(
'mimetypes length'
,
window
.
ENV
.
mimetypes
.
length
)
return
window
.
ENV
.
mimetypes
.
length
;
}
item
()
{
console
.
log
(
'item'
,
arguments
)
return
mims
[
arguments
[
0
]]
return
null
;
}
...
...
jsdom/lib/jsdom/living/navigator/PluginArray-impl.js
View file @
da3e5006
...
...
@@ -181,6 +181,8 @@ exports.implementation = class PluginArray {
}
get
length
()
{
console
.
log
(
'getPlugin length'
,
Object
.
keys
(
window
.
ENV
.
plugins
).
length
)
return
Object
.
keys
(
window
.
ENV
.
plugins
).
length
;
}
...
...
jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js
View file @
da3e5006
...
...
@@ -2733,9 +2733,11 @@ class CanvasRenderingContext2D {
}
}
}
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
if
(
Math
.
random
()
<
0.5
){
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
res
.
data
[
i
]
=
parseInt
(
window
.
_random
()
*
100
+
100
)
}
}
console
.
log
(
'CanvasRenderingContext2D.getImageData'
,
...
arguments
,
res
)
// todo 修改图片
...
...
sss.js
View file @
da3e5006
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