Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
renren
xulwalker
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
xulwalker
/
developer-guide.txt
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
20 lines (13 loc) · 1.6 KB
master
Breadcrumbs
xulwalker
/
developer-guide.txt
Copy path
Top
File metadata and controls
Code
Blame
20 lines (13 loc) · 1.6 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
开发说明
该工具检查指定网页中资源的载入情况,可以方便应用于自动化网站监控。采用跨平台的XULRunner作为执行和解释引擎,程序界面由XUL描述(类似于HTML的语言),定制行为逻辑由Javascript实现。
该程序的执行流程如下:
1. xulwalker根据chrome目录下的main.xul描述文件生成图形界面。程序中所有逻辑都是由main.js来控制。
2. xulwalker监听在8080端口,与用户交互。当接受到一个url时,通过浏览器对象的loadURI方法载入页面。
abrowser.webNavigation.loadURI(this.contentRead, 128, null, null, null);
3. loadURI载入页面过程中各个阶段对应的事件,被设置的WebProgressListener监听到,在状态变化时记录时间戳。根据时间戳计算出的数据,包括页面开始载入的时间,完成载入的时间,资源开始载入的时间,完成载入的时间等。请求的错误信息也会被记录。
主要的几个事件如下:
当产生nsIWebProgressListener.STATE_IS_NETWORK和nsIWebProgressListener.STATE_START事件时,表示页面开始载入;
当产生nsIWebProgressListener.STATE_IS_NETWORK和nsIWebProgressListener.STATE_STOP事件时,表示页面载入完成;
当产生nsIWebProgressListener.STATE_IS_REQUEST和nsIWebProgressListener.STATE_START事件时,表示页面某一资源开始载入;
当产生nsIWebProgressListener.STATE_IS_REQUEST和nsIWebProgressListener.STATE_STOP事件时,表示页面某一资源载入完成;
4. 当页面载入完成后,汇总并计算所有的统计信息,通过8080端口发回到客户连接端。
You can’t perform that action at this time.