Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么重写或继承java类呢? #236

Open
YmStrip opened this issue Apr 1, 2024 · 0 comments
Open

怎么重写或继承java类呢? #236

YmStrip opened this issue Apr 1, 2024 · 0 comments

Comments

@YmStrip
Copy link

YmStrip commented Apr 1, 2024

rollup+ts -> es5
尝试1
client = new class extends WebChromeClient {
onConsoleMessage(message: string, lineNumber: number, sourceID: string) {
console.log(${sourceID}:${lineNumber}\n${message})
}
}
//polyfill的函数貌似不支持, “没有apply的公共方法”
尝试2
client = new WebChromeClient()
client.onConsoleMessage = (a,b,c) => {}
//无法被赋值
尝试3
console.log(client.class.getMethod) //funcion
//反射,貌似只能修改不是函数的类型,没有尝试
尝试4
//字节码?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant