fluttercommunity / fluttercommunity/flutter_webview_plugin

Can I inject js code before the document loads?

未关闭
#459 2 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
1.5k
派生
938
PR 合并指标
30 天内没有已合并 PR

描述

`evalJavaScript` must be run after the page has finished loading. But i want to inject javascript code before the document loads. Reference:

```swift
WKUserScript(source: sourceJs, injectionTime: .atDocumentStart, forMainFrameOnly: false)
```

so do we provide this flutter api?

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先跟踪现有的 evalJavaScript API 和原生 WebView 集成;issue 指向带有 .atDocumentStart 的 WKUserScript,作为所请求的行为。检查 plugin 是否有用于 JavaScript injection 的文档化入口点或测试。确认 Flutter 是否能够在文档加载前提供 injection,并在相关平台上验证该行为,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
flutter, swift
领域
mobile
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。