// all examples in this section are taken from the product demo page on ampbyexample.com
https://ampbyexample.com/samples_templates/product_page/
`` tab content: https://codepen.io/cathyxz/pen/vReqdy
// Scraping Made Easy with jQuery and SelectorGadget | |
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga) | |
// by David Trejo | |
// | |
// Install node.js and npm: | |
// http://joyeur.com/2010/12/10/installing-node-and-npm/ | |
// Then run | |
// npm install jsdom jquery http-agent | |
// node numresults.js | |
// |
#!/bin/sh | |
# Pre-merge hook that lists all commits and asks you if you really want to | |
# merge them in. For release branches only. | |
case $2 in | |
merge) | |
branch=$(grep -o "release/[0-9]\.[0-9]" $1) | |
if [[ ! -z $branch ]] | |
then |
#!/bin/sh | |
count=`git diff HEAD | grep '+.*console\.log' | wc -l | awk '{print $1}'` | |
if [[ "$count" -ge 1 ]]; then | |
echo "Please remove console.log() statements from your changes before committing." | |
echo "Refusing to commit changes." | |
git diff HEAD | grep '+.*console\.log' | |
exit 1 | |
fi |
{ | |
"items": [{ | |
"name": "Afghanistan", | |
"code": "AF" | |
}, | |
{ | |
"name": "land Islands", | |
"code": "AX" | |
} | |
] |
Failures: | |
1) ValidatorFeatures amp-facebook-page/0.1/test/validator-amp-facebook-page.html | |
Message: | |
AssertionError: | |
amp-facebook-page/0.1/test/validator-amp-facebook-page.out:1:0 | |
expected: | |
PASS | |
| <!-- | |
| Copyright 2018 The AMP HTML Authors. All Rights Reserved. | |
| |
// all examples in this section are taken from the product demo page on ampbyexample.com
https://ampbyexample.com/samples_templates/product_page/
`` tab content: https://codepen.io/cathyxz/pen/vReqdy
I can't find exact specifications on this, but it seems that iOS restricts bringing up the keyboard via programmatically focusing on <input>
. It only brings up the keyboard in response to explicit user interaction.
This presents a curious problem when you want to autofocus an input inside a modal or lightbox, since what you generally do is click on a button to bring up the lightbox, and then focus on the input after the lightbox has been opened. Without anything fancy, it actually works ok. The problem shows up when you try to add something fancy like a setTimeout
or a promise.then()
. I don't know why people would want to use a setTimeout here, but waiting for a promise is actually a pretty common use case. E.g. we try to batch dom manipulations like getting a lightbox to show up inside `requestAnimati
Search Expression for all PRs created since date reviewed by me but not authored by me.
is:pr created:>=2018-03-01 reviewed-by:cathyxz -author:cathyxz
CreateCustomEvent events don't bubble by default. So if you listen to something on the window, and create a custom event to test it, you need to make sure that the event bubbles.