jsinspector

2019-08-14 admin

jsinspector是什么

什么是jsinspector,JS Web Inspector

jsinspector使用教程帮助文档

jsinspector

npm version

Mobile debug toolkit, include console.log, HTML Inspector and script inject api.

show

Install and Run

For node via npm:

npm install jsinspector -g
jsinspector server

The server’s port default to 9000, open Dashboard page in browser:

http://localhost:9000

Note: use jsinspector server --port PORT to start server with specified port.

Features

  • Console from Remote

Support console of log, clear, error, info, warn, time and timeEnd:

console.log(window); // -> {xxx: 'String', xxx2: 'Function', ..., window: 'Global'} 
console.log(document); // -> {xxx: 'String', xxx2: 'Function', ..., body: 'HTMLBodyElement'}

console sync

  • Execute Script

Using inject method to execute script in remote browser:

inject('console.log("window")')

// block codes
inject(function () {
    console.log(document)
})

// insert external script
inject.js('http://yourhost/lib.js')

// insert external style sheet
inject.css('http://yourhost/style.css')

License

The MIT License (MIT)

Copyright © 2014 guankaishe

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72439.html

文章标题:jsinspector

回到顶部