Commit 91d88327 authored by wang's avatar wang

乱图 渲染

parent fb85fc50
No preview for this file type
No preview for this file type
This diff is collapsed.
import { createRequire } from "https://deno.land/std@0.173.0/node/module.ts";
const require = createRequire(import.meta.url);
// Loads native module polyfill.
const path = require("path");
// Loads extensionless module.
const cjsModule = require("../jsdom");
// Visits node_modules.
const fs = require("fs");
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -331,8 +331,7 @@ let fonts = [{"font": "50px sans-serif", "text": "0-_{w."}, {
}, {"font": "1000px fantasy", "text": "঳"}, {"font": "1000px fantasy", "text": "᱐"}, {
"font": "1000px fantasy",
"text": "☙"
}]
fonts = [{"font": "72px monospace", "text": "mmmmmmmmlli"}, {
}, {"font": "72px monospace", "text": "mmmmmmmmlli"}, {
"font": "72px sans-serif",
"text": "mmmmmmmmlli"
}, {"font": "72px serif", "text": "mmmmmmmmlli"}, {
......@@ -719,19 +718,13 @@ let screenParams = {
colorDepth: screen.colorDepth,
}
let features;
try {
features = document.featurePolicy.features();
} catch (e) {
}
let featurePolicy;
if (document.featurePolicy) {
debugger;
featurePolicy = {
features: features,
features: document.featurePolicy.features(),
allowedFeatures: document.featurePolicy.allowedFeatures(),
getAllowlistForFeature: 'url',
}
}
let windowParams = {
......@@ -869,6 +862,7 @@ setTimeout(function (){
windowParams: windowParams,
screenParams: screenParams,
navigatorParams: navigatorParams,
featurePolicy: featurePolicy,
plugins: plgs,
mimeTypes: mimes,
fontsRes: fontsRes,
......
{
"jsdom": "https://esm.sh/jsdom"
"jsdom": "file:///Users/wang/Documents/company/shape-bypass/jsdom"
}
\ No newline at end of file
This diff is collapsed.
......@@ -2,10 +2,10 @@ let proxy = function (tt, name) {
return new Proxy(tt, {
get(target, p, receiver) {
let res = Reflect.get(target, p, receiver);
// console.log(`${name} get`, p, typeof res)
// if (!['_registeredHandlers', 'window', '_currentEvent', '_eventListenerss','JSON','Math','JSON'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
// return proxy(res, `${name}.${p}`)
// }
console.log(`${name} get`, p, typeof res)
if (!['_registeredHandlers', 'window', '_currentEvent', '_eventListenerss','JSON','Math','JSON'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
return proxy(res, `${name}.${p}`)
}
return res;
}
})
......@@ -265,7 +265,7 @@ function Window(options) {
// debugger;
// }
let res = Reflect.get(target, p, receiver);
if (!['Object','Window' , 'debug','Math'].includes(p)){
if (!['Object','Window' , 'debug','Math', 'Array'].includes(p)){
console.log('window get', p, typeof res)
}
......@@ -467,6 +467,7 @@ function Window(options) {
return screen;
},
get origin() {
console.log('getorigin')
return window._origin;
},
// The origin IDL attribute is defined with [Replaceable].
......
......@@ -232,7 +232,7 @@ exports.install = (globalObject, globalNames) => {
return utils.tryWrapperForImpl(esValue[implSymbol].getElementsByClassName(...args));
}
featurePolicy() {
get featurePolicy() {
class FeaturePolicy{
constructor(props) {
......@@ -254,7 +254,7 @@ exports.install = (globalObject, globalNames) => {
},
getAllowlistForFeature: {
value: function (){
return 'https://www.jetblue.com/'
return ['https://www.jetblue.com/']
},
enumerable: true
}
......
......@@ -2787,8 +2787,8 @@ class CanvasRenderingContext2D {
console.log('CanvasRenderingContext2D.translate')
}
arc() {
console.log('CanvasRenderingContext2D.arc', arguments)
arc(a,b,c,d,e) {
console.log('CanvasRenderingContext2D.arc', a,b,c,d,e)
return this._context.arc(...arguments)
}
......@@ -2820,7 +2820,7 @@ class CanvasRenderingContext2D {
}
fillRect(a,b,c,d) {
console.log('CanvasRenderingContext2D.fillRect', arguments)
console.log('CanvasRenderingContext2D.fillRect', a,b,c,d)
return this._context.fillRect(a,b,c,d)
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -4824,7 +4824,7 @@
}
})
print([].slice.call(res).join('iii'))
console.log([].slice.call(res).join('iii'))
}
times++;
// print({opcodeHandlerCounter: vmContext.opcodeHandlerCounter, programCounter: vmContext.programCounter, reg: vmContext.reg})
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment