René's URL Explorer Experiment


Title: Remove the need for a timeout in smoke test for font loading by mgrandrath · Pull Request #6 · jamesshore/lets_code_javascript · GitHub

Open Graph Title: Remove the need for a timeout in smoke test for font loading by mgrandrath · Pull Request #6 · jamesshore/lets_code_javascript

X Title: Remove the need for a timeout in smoke test for font loading by mgrandrath · Pull Request #6 · jamesshore/lets_code_javascript

Description: I wired up the font loading events to PhantomJS. The callback onInitialized is called before the page is loaded (especially before the IIFE with the TypeKit boilerplate is executed). It defines callbacks for fontactive and done in the browser's global namespace. The loaded fonts get stored in a local array. When done is called PhantomJS is notified via callPhantom (which is provided by PhantomJS). callPhantom triggers page.onCallback with the collected fonts array as argument (Note: only serializable data can be exchanged this way). On the client side, the callbacks that are defined via PhantomJS are assigned to the config object (or a no-op function if they are undefined, which will be the case outside of the smoke test). Remaining problems The test does not feel terribly faster. I don't know if there are any PhantomJS settings or other tweaks that would improve this. The call to phantom.exit() is now within onCallback which is less than ideal. Either should there be a mechanism for collecting asynchronous test results or each test should go into its own file. The former is probably better for performance (because of spawning less processes) while the latter is generally simpler and makes it easier to organize the tests.

Open Graph Description: I wired up the font loading events to PhantomJS. The callback onInitialized is called before the page is loaded (especially before the IIFE with the TypeKit boilerplate is executed). It defines ca...

X Description: I wired up the font loading events to PhantomJS. The callback onInitialized is called before the page is loaded (especially before the IIFE with the TypeKit boilerplate is executed). It defines ca...

Opengraph URL: https://github.com/jamesshore/lets_code_javascript/pull/6

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bb46fc2b-41de-a852-e233-b9c264d7bb52
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA440:6B47E:57B0EA:7307DA:69921560
html-safe-nonce02a887250b43faad69b93287bc55e00c2e8e82c6716ff2ea1c8efaf98f2a20c1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDQwOjZCNDdFOjU3QjBFQTo3MzA3REE6Njk5MjE1NjAiLCJ2aXNpdG9yX2lkIjoiNDE0NjA2ODE2NDY2NzY0MzIzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac041888856f42c7b9d1269615f9e59008f039a6a03b4f69b1d8363dc9f1a2964e
hovercard-subject-tagpull_request:25169149
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/jamesshore/lets_code_javascript/pull/6/files
twitter:imagehttps://avatars.githubusercontent.com/u/399903?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/399903?s=400&v=4
og:image:altI wired up the font loading events to PhantomJS. The callback onInitialized is called before the page is loaded (especially before the IIFE with the TypeKit boilerplate is executed). It defines ca...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/jamesshore/lets_code_javascript git https://github.com/jamesshore/lets_code_javascript.git
octolytics-dimension-user_id123129
octolytics-dimension-user_loginjamesshore
octolytics-dimension-repository_id4981757
octolytics-dimension-repository_nwojamesshore/lets_code_javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id4981757
octolytics-dimension-repository_network_root_nwojamesshore/lets_code_javascript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release848bc6032dcc93a9a7301dcc3f379a72ba13b96e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjamesshore%2Flets_code_javascript%2Fpull%2F6%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjamesshore%2Flets_code_javascript%2Fpull%2F6%2Ffiles
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=jamesshore%2Flets_code_javascript
Reloadhttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
Reloadhttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
Reloadhttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
jamesshore https://patch-diff.githubusercontent.com/jamesshore
lets_code_javascripthttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fjamesshore%2Flets_code_javascript
Fork 128 https://patch-diff.githubusercontent.com/login?return_to=%2Fjamesshore%2Flets_code_javascript
Star 251 https://patch-diff.githubusercontent.com/login?return_to=%2Fjamesshore%2Flets_code_javascript
Code https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript
Issues 0 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/issues
Pull requests 9 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pulls
Actions https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/actions
Projects 0 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/projects
Wiki https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/wiki
Security 0 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/security
Insights https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pulse
Code https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript
Issues https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/issues
Pull requests https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pulls
Actions https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/actions
Projects https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/projects
Wiki https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/wiki
Security https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/security
Insights https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2Fjamesshore%2Flets_code_javascript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2Fjamesshore%2Flets_code_javascript%2Fissues%2Fnew%2Fchoose
mgrandrathhttps://patch-diff.githubusercontent.com/mgrandrath
jamesshore:masterhttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/tree/master
mgrandrath:remove_need_for_timeout_from_fonts_checkhttps://patch-diff.githubusercontent.com/mgrandrath/lets_code_javascript/tree/remove_need_for_timeout_from_fonts_check
Conversation 0 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6
Commits 3 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/commits
Checks 0 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/checks
Files changed https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
Please reload this pagehttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
Remove the need for a timeout in smoke test for font loading https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#top
Show all changes 3 commits https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
4b76e4e Get rid of timeout in smoke test for font loading Nov 27, 2014 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/commits/4b76e4e03120ff7d57ef669858f831546a4403d1
782a485 Remove global variable '__loadedFonts' Nov 27, 2014 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/commits/782a485facb05aac35c8fc5d7fad320ab0b84b9b
97a4608 Less invasive code for testing typekit integration Dec 7, 2014 https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/commits/97a460853d74198e05d9e29ca0d148e1bfea37d1
Clear filters https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
Please reload this pagehttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
Please reload this pagehttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files
_phantomjs.js https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-6671a205c013ff9089fac0132af10b3b18bc4f991e7d729edbf3496b8528bb86
index.html https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6
src/_phantomjs.jshttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-6671a205c013ff9089fac0132af10b3b18bc4f991e7d729edbf3496b8528bb86
View file https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/blob/97a460853d74198e05d9e29ca0d148e1bfea37d1/src/_phantomjs.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-6671a205c013ff9089fac0132af10b3b18bc4f991e7d729edbf3496b8528bb86
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-6671a205c013ff9089fac0132af10b3b18bc4f991e7d729edbf3496b8528bb86
src/client/index.htmlhttps://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6
View file https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/blob/97a460853d74198e05d9e29ca0d148e1bfea37d1/src/client/index.html
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/{{ revealButtonHref }}
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6
https://patch-diff.githubusercontent.com/jamesshore/lets_code_javascript/pull/6/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.