playwright/package.json
Andrey Lushnikov 329b34e894
feat: implement mac keyboard (#197)
This list contains all of the default keyboard shortcuts for macos, and the Objective-C selector that they trigger on the [NSStandardKeyBindingResponding](https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding/3005237-moveleft?language=objc). We need these for basic keyboard functionality like ArrowUp and ArrowDown to work on WebKit for mac. For other browsers on mac, the same list can be used to enable better mac keyboard emulation.

The list was made by constructing NSEvents on a mac and seeing what selectors they triggered on an NSTextView. The conversion from NSEvents to DOM codes was done partially by hand as the code that does this conversion lives across many files in WebKit. There may be some errors or missing commands, but in general this should be a more faithful mac keyboard emulation than what we do in Chromium currently.

Notably absent from the list are Cut, Copy, Paste, Paste Special, Undo, and Redo. They are handled in a slightly different way.
2019-12-10 13:22:01 -08:00

83 lines
2.7 KiB
JSON

{
"name": "playwright",
"version": "0.9.1-post",
"description": "A high-level API to control web browsers",
"repository": "github:Microsoft/playwright",
"engines": {
"node": ">=10.17.0"
},
"main": "index.js",
"playwright": {
"chromium_revision": "719491",
"firefox_revision": "1004",
"webkit_revision": "1025"
},
"scripts": {
"unit": "node test/test.js",
"funit": "cross-env BROWSER=firefox node test/test.js",
"wunit": "cross-env BROWSER=webkit node test/test.js",
"debug-unit": "node --inspect-brk test/test.js",
"test-doclint": "node utils/doclint/check_public_api/test/test.js && node utils/doclint/preprocessor/test.js",
"test": "npm run lint --silent && npm run coverage && npm run test-doclint && node utils/testrunner/test/test.js",
"prepare": "node install.js",
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe --ext js,ts ./src || eslint --ext js,ts ./src) && npm run tsc && npm run doc",
"doc": "node utils/doclint/cli.js",
"coverage": "cross-env COVERAGE=true npm run unit",
"tsc": "tsc -p .",
"build": "node utils/runWebpack.js --mode='development' && tsc -p .",
"watch": "node utils/runWebpack.js --mode='development' --watch --silent | tsc -w -p .",
"apply-next-version": "node utils/apply_next_version.js",
"bundle": "npx browserify -r ./index.js:playwright -o utils/browser/playwright-web.js",
"unit-bundle": "node utils/browser/test.js"
},
"author": {
"name": "Microsoft Corporation"
},
"license": "MIT",
"dependencies": {
"debug": "^4.1.0",
"extract-zip": "^1.6.6",
"https-proxy-agent": "^3.0.0",
"jpeg-js": "^0.3.6",
"mime": "^2.0.3",
"pngjs": "^3.4.0",
"proxy-from-env": "^1.0.0",
"rimraf": "^2.6.1",
"ws": "^6.1.0"
},
"devDependencies": {
"@types/debug": "0.0.31",
"@types/extract-zip": "^1.6.2",
"@types/jpeg-js": "^0.3.7",
"@types/mime": "^2.0.0",
"@types/node": "^8.10.34",
"@types/pngjs": "^3.4.0",
"@types/rimraf": "^2.0.2",
"@types/ws": "^6.0.1",
"@typescript-eslint/eslint-plugin": "^2.6.1",
"@typescript-eslint/parser": "^2.6.1",
"commonmark": "^0.28.1",
"cross-env": "^5.0.5",
"eslint": "^6.6.0",
"esprima": "^4.0.0",
"minimist": "^1.2.0",
"ncp": "^2.0.0",
"node-stream-zip": "^1.8.2",
"pixelmatch": "^4.0.2",
"progress": "^2.0.1",
"text-diff": "^1.0.1",
"ts-loader": "^6.1.2",
"typescript": "3.6.3",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9"
},
"browser": {
"./lib/BrowserFetcher.js": false,
"ws": "./utils/browser/WebSocket",
"fs": false,
"child_process": false,
"rimraf": false,
"readline": false
}
}