The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
--tell application "Google Chrome" | |
-- set front_tab_url to URL of active tab of front window as text | |
--end tell | |
-- tell current application to set selection to front_tab_url | |
tell application "Google Chrome" | |
set the clipboard to URL of active tab of front window as text | |
end tell |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
on alfred_script(q) | |
tell application "Google Chrome" to activate -- needs to be in front | |
tell application "System Events" to tell application process "Chrome" | |
try | |
repeat with x from 1 to (count windows) | |
get properties of window x | |
set position of window x to {0, 21} | |
set size of window x to {1280, 709} | |
end repeat | |
end try |
This guide assumes you have the emmet
and language-babel
packages already installed in Atom
keymap.cson
file by clicking on Atom -> Keymap…
in the menu bar'atom-text-editor[data-grammar~="jsx"]:not([mini])':
Install ESLint VS Code extension
Install Vue 2 Snippts VS Code extension
Install eslint-plugin-html: npm install --save-dev eslint-plugin-html
Add "plugins": ["html"]
to eslintrc config file as per eslint-plugin-html instructions. Vue extension is enabled by default for the plugin.
Open VS Code user settings and add vue to eslint.validate:
"eslint.validate": [ "javascript", "javascriptreact", "vue" ]
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Respond to the request | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { |
These are generic npm scripts that you can copy & paste into your package.json
file as-is and get access to convinience scripts to manage your Docker images all in one place.
npm i -g mrm-task-npm-docker
npx mrm npm-docker
Here's the code repository https://github.com/expertly-simple/mrm-task-npm-docker