Giter VIP home page Giter VIP logo

mywebview's Introduction

WebView plugin for special bank

提供給特定公司的webview plugin

特色

  1. 每一次touch都會回傳點選時間
  • 回傳格式:{"type":"touch","lastTouchTime": @millsecond@ } @millsecond@ 是使用者按下時機的絕對時間
InvestmentWebView.addEventListener('touch', successCallback, errorCallback)
function successCallback(object){
    console.log(object.lastTouchTime) // 1534412
}
function errorCallback(object){
    console.log(object) // android/ios error message
}
  1. 攔截網頁中的button click, 並回傳html ID
  • 回傳格式:{"type":"buttonclick","id": @buttonid@ } @buttonid@ 是使用者按下的button id
InvestmentWebView.addEventListener('buttonclick', successCallback, errorCallback)
function successCallback(object){
    console.log(object.id) // CloseBtn009
}
function errorCallback(object){
    console.log(object) // android/ios error message
}
  1. 切換網頁都會回傳網址
  • 回傳格式:{"type":"loadstart","url": @url@ } @url@ 是切換後的目的網址
InvestmentWebView.addEventListener('loadstart', successCallback, errorCallback)
function successCallback(object){
    console.log(object.url) // https://www.google.com
}
function errorCallback(object){
    console.log(object) // android/ios error message
}
  1. 支援從cordova上層直接關閉webview
InvestmentWebView.close()
  1. 開啟網址
  • title(string): 手機上webview標題文字
  • url(string): 網址
  • type(int): 特定說明文件
  • noteButtonString(string): 說明按鈕要顯示給用戶的文字
InvestmentWebView.openWeb(title, url, type, noteButtonString)

mywebview's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.