Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error reporting for broken images #1

Closed
wants to merge 1,434 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1434 commits
Select commit Hold shift + click to select a range
a989081
Properly wrap our main binary in a IEFE.
cramforce Jan 29, 2016
e587ef4
Merge pull request #1684 from cramforce/wrapper-closure
cramforce Jan 30, 2016
06d4b72
amp-embed now validates.
cramforce Jan 30, 2016
55c89a3
Merge pull request #1685 from cramforce/validator-sync
dvoytenko Jan 30, 2016
457d50d
Avoid promise rejection before storage API is actually used
Jan 29, 2016
0cc928e
Merge pull request #1682 from Gregable/validator
powdercloud Jan 30, 2016
ad14a68
Merge pull request #1683 from dvoytenko/storage4
dvoytenko Jan 30, 2016
1c5ee58
Get tests in saucelabs passing again and add MS Edge to set of tested…
cramforce Jan 30, 2016
c5a911d
Output message when all current browserify bundle operations are done.
cramforce Jan 30, 2016
9814f0f
Merge pull request #1690 from cramforce/sc-tests
cramforce Jan 30, 2016
5727f0d
Merge pull request #1691 from cramforce/bundle-done
cramforce Jan 31, 2016
6f57f25
# This is a combination of 2 commits.
acorretti-comscore Jan 27, 2016
3ffd791
Merge pull request #1608 from comScore/master
cramforce Feb 1, 2016
e8ab60f
Customize return URL query form
Feb 1, 2016
f3baac7
update lint versions, downgrade escope manually through npm-shrinkwra…
erwinmombay Feb 1, 2016
4633e7f
Merge pull request #1710 from erwinmombay/fix-eslint
erwinmombay Feb 1, 2016
d648ca2
remove escope and upgrade eslint-babel
erwinmombay Feb 1, 2016
ad53fbd
Remove example not needed here.
cramforce Feb 1, 2016
c43fbef
Updating docs to be more usecase driven.
cramforce Feb 1, 2016
313de32
CSS parser refactoring.
powdercloud Feb 1, 2016
3bd74c3
Change new boilerplate timeout to 8s.
Gregable Feb 1, 2016
edf22d0
Merge pull request #1719 from Gregable/validation
Gregable Feb 1, 2016
8ee6704
Merge pull request #1715 from erwinmombay/package-update
erwinmombay Feb 1, 2016
5475654
Whitelist embed types that are allowed to use amp-embed.
cramforce Feb 1, 2016
ce5ebaf
Documentation for heights attribute
Feb 1, 2016
f4ea04d
Merge pull request #1724 from dvoytenko/heights-docs
dvoytenko Feb 1, 2016
9894c96
Merge pull request #1709 from dvoytenko/access26
dvoytenko Feb 2, 2016
66b603a
add release for branches to build on push
erwinmombay Feb 1, 2016
0effb4d
Merge pull request #1726 from erwinmombay/turn-on-release
erwinmombay Feb 2, 2016
8f18fed
Merge pull request #1723 from cramforce/embed-type-lock
cramforce Feb 2, 2016
124bad2
Update spec to correctly point out allowed link-rel values.
cramforce Feb 1, 2016
6f8354b
Merge pull request #1543 from jmadler/samples
cramforce Feb 2, 2016
5313dae
Add amp-vimeo element to load vimeo videos.
mkhatib Feb 2, 2016
4b251f1
Do not retain references to the closures wrapping AMP extensions.
cramforce Feb 2, 2016
371ba74
Merge pull request #1729 from cramforce/release-extensions
cramforce Feb 2, 2016
b41e173
chore(package): update babel-eslint to version 4.1.8
greenkeeperio-bot Feb 2, 2016
9d17f35
Merge pull request #1733 from ampproject/greenkeeper-babel-eslint-4.1.8
erwinmombay Feb 2, 2016
fae0c30
#1669 add ad provider plista
Feb 2, 2016
886bb8d
Mention isMaster property in docs.
cramforce Feb 2, 2016
93256f6
Speed up npm installs on Travis
jridgewell Feb 2, 2016
60a1f40
Fix several bugs in CSI collection:
cramforce Feb 2, 2016
4a40776
Merge pull request #1736 from jridgewell/travis-npm-install
jridgewell Feb 2, 2016
612373f
Merge pull request #1734 from cramforce/broken-csi
cramforce Feb 2, 2016
0a056ca
Amp Boiler plate changes to be done after validator changes to suppor…
camelburrito Dec 4, 2015
997fdf9
Drop video-id param
mkhatib Feb 2, 2016
825dd9d
Simple version check for minimum node version for our gulp deps.
cramforce Feb 2, 2016
63fdbba
Merge pull request #1739 from cramforce/min-version
cramforce Feb 2, 2016
fc275cd
Merge pull request #1731 from mkhatib/amp-vimeo
cramforce Feb 2, 2016
eb641b0
Merge pull request #1067 from sriramkrish85/boilerplate
Feb 2, 2016
4cda1a7
Fix undefined declrations
Feb 2, 2016
3a172c8
Merge pull request #1740 from dvoytenko/fixes32
dvoytenko Feb 2, 2016
0bcc70b
Merge pull request #1669 from plista/plista-playground
cramforce Feb 2, 2016
113c86f
Remove the `development` attribute from manual test files.
camelburrito Feb 2, 2016
477e36c
Expose services for AMP Analytics
Feb 2, 2016
79a58e5
implement taboola ad-type
Jan 14, 2016
1516f70
Merge pull request #1749 from sriramkrish85/cleanup
Feb 2, 2016
9a5acca
Merge pull request #1750 from dvoytenko/access27-conf
dvoytenko Feb 2, 2016
798e527
Send GA client id to doubleclick and adsense if available.
cramforce Jan 29, 2016
9b3bdb8
Recreate stored objects as prototype-less objects
Feb 2, 2016
2965970
Merge pull request #1515 from taboola/With-taboola-ad-type
cramforce Feb 2, 2016
3072a84
Merge pull request #1751 from dvoytenko/storage5
dvoytenko Feb 2, 2016
5076ccf
Remove ambiguity of keys matching by requiring longer keys to match f…
Feb 3, 2016
b4da888
Merge pull request #1752 from dvoytenko/urlrepl-nonincl
dvoytenko Feb 3, 2016
a9497e5
Pass referrer from the viewer
Feb 1, 2016
8d18778
Merge pull request #1717 from dvoytenko/viewer-ref
dvoytenko Feb 3, 2016
bb4faca
added implementation for dotandads type for amp-ad
dotandads Feb 1, 2016
dc14548
Merge pull request #1705 from dotandads/master
cramforce Feb 3, 2016
6e45dc5
Update list of supported ad networks
cramforce Feb 3, 2016
ade253b
Reference taboola docs from amp-embed page.
cramforce Feb 3, 2016
fb54697
Enable custom events in analytics
Feb 3, 2016
085d0a7
Merge pull request #1700 from ampproject/cramforce-patch-1
cramforce Feb 3, 2016
31331bc
Tag error reports coming from the cache over the general internet.
cramforce Feb 2, 2016
14d9a2e
Merge pull request #1658 from cramforce/doubleclick-cid
cramforce Feb 3, 2016
7bfca6a
Viewer handshake with origin validation
Feb 3, 2016
c8880f4
Add Code Blocks to AMP Boilerplate Code Docs
jridgewell Feb 3, 2016
9f22184
Merge pull request #1743 from cramforce/explicit-severity
cramforce Feb 3, 2016
97ed7f9
Fix old-boilerplate test file
camelburrito Feb 3, 2016
20764ad
Merge pull request #1771 from sriramkrish85/cleanup
Feb 4, 2016
446b59b
Validate CSS recursively.
powdercloud Feb 4, 2016
0110ebe
Fix for the Turkish İ occurring in the document.
powdercloud Feb 4, 2016
bf07b12
Merge pull request #1774 from powdercloud/update-github
powdercloud Feb 4, 2016
f7c11f1
Fixed bug with missing &
LendsMan Feb 4, 2016
9561a8f
Added <amp-ad type="adform"> support.
Feb 3, 2016
aaafecc
Fixed config to send document title correctly.
avimehta Feb 4, 2016
9974f8d
Merge pull request #1780 from avimehta/patch-3
cramforce Feb 4, 2016
62f2090
Add dateModified to Recipes samples
Feb 4, 2016
500801e
Clarify non-support for xml attributes
Feb 4, 2016
efd2381
Merge pull request #1785 from jmadler/xmlattr
cramforce Feb 4, 2016
d935d98
Tunes ad loading heuristic.
cramforce Feb 4, 2016
ef05c50
Merge pull request #1758 from adform/master
cramforce Feb 4, 2016
6f6939f
Merge pull request #1775 from LendsMan/patch-1
jridgewell Feb 4, 2016
1c2640f
Add missing files to example validation.
cramforce Feb 4, 2016
65a79e6
Merge pull request #1770 from ampproject/jridgewell-patch-1
jridgewell Feb 4, 2016
657aa3a
Merge pull request #1787 from cramforce/example-validatio
cramforce Feb 4, 2016
988e63c
Merge pull request #1765 from dvoytenko/viewer-origin
dvoytenko Feb 4, 2016
f5fa425
Requirements of source origin security in access endpoints
Feb 4, 2016
406770c
Merge pull request #1786 from cramforce/ad-heuristics
cramforce Feb 4, 2016
009d571
Add support for Chartbeat analytics
Feb 1, 2016
74aede0
Bring docs in line with code
cramforce Feb 4, 2016
b07d6ef
Merge pull request #1760 from dvoytenko/access27-events
dvoytenko Feb 4, 2016
944638f
This now validates.
cramforce Feb 4, 2016
033ba56
Merge pull request #1795 from cramforce/analytics-validation
cramforce Feb 4, 2016
4b878e5
Add timer trigger for amp-analytics
breauxc Jan 27, 2016
a23364a
Add random token to 3p post messages.
cramforce Feb 4, 2016
5f92353
refactor(amp-carousel): add `delay` attribute for carousel autoplay d…
erwinmombay Feb 1, 2016
e2d86ef
Merge pull request #1712 from britice/chartbeat
cramforce Feb 4, 2016
2b15cb9
Update version number to 0.3
Feb 4, 2016
f445f95
Merge pull request #1773 from dvoytenko/access29
dvoytenko Feb 4, 2016
8b63778
Access: require CORS/AMP authorization
Feb 4, 2016
caeb6cd
Merge branch 'breauxc-chris_analytics_timer'
cramforce Feb 5, 2016
07b3b5f
Merge pull request #1789 from cramforce/three-p-protocol
cramforce Feb 5, 2016
0e50d11
Merge pull request #1790 from erwinmombay/update-carousel-spec
erwinmombay Feb 5, 2016
126829e
Pass source origin in all fetch requests
Feb 4, 2016
fcbff7b
Merge pull request #1799 from ashwinlimaye/patch-1
dvoytenko Feb 5, 2016
0816d4c
Merge pull request #1772 from dvoytenko/access28
dvoytenko Feb 5, 2016
4dd7918
Hide ads when doc becomes inactive and show them again.
cramforce Feb 5, 2016
04c07b1
Fix analytics tests and requestCount
Feb 5, 2016
da6f1d6
Merge pull request #1804 from dvoytenko/fixes35
dvoytenko Feb 5, 2016
54a27c9
Confirm viewer and referrer via messaging channel
Feb 4, 2016
09d204f
Merge pull request #1781 from dvoytenko/access30
dvoytenko Feb 5, 2016
66462b8
Merge pull request #1801 from cramforce/ads-display
cramforce Feb 5, 2016
f86f6ec
Adding Smart AdServer support
Feb 5, 2016
fe5f740
Enable retrieving amp-analytics remote config with credentials.
cramforce Feb 5, 2016
f5cd1b6
Merge pull request #1808 from sebastienferry/master
cramforce Feb 5, 2016
64b20ba
Merge pull request #1805 from cramforce/analytics-config
cramforce Feb 5, 2016
5536b9a
Merge pull request #1800 from dvoytenko/access31
cramforce Feb 5, 2016
9ee7c99
Clarify display:none behavior
cramforce Feb 5, 2016
896a4d6
Make sure we re-show visible ads as fast as possible.
cramforce Feb 5, 2016
d96a38d
Merge pull request #1811 from cramforce/ad-show
cramforce Feb 5, 2016
b764424
Running the tests broke local demos.
cramforce Feb 5, 2016
275afd4
Merge pull request #1813 from cramforce/ad-show
cramforce Feb 5, 2016
a40889c
remove canary suffix from dist
erwinmombay Feb 5, 2016
d8f41a0
Merge pull request #1812 from erwinmombay/remove-canary-suffix-check
erwinmombay Feb 5, 2016
e4705da
add copyright
erwinmombay Feb 5, 2016
3211ca2
Merge pull request #1817 from erwinmombay/fix-build
erwinmombay Feb 5, 2016
216c7ad
Added scroll trigger.
avimehta Jan 28, 2016
fb9035d
Merge pull request #1767 from avimehta/scroll
cramforce Feb 6, 2016
41d42f6
Fix sending viewport records for elements that are initially in viewport
cramforce Feb 6, 2016
2619612
Merge pull request #1823 from cramforce/initial-viewability
cramforce Feb 6, 2016
44295ff
remove global config from extension
erwinmombay Feb 6, 2016
17b32e3
Merge pull request #1824 from erwinmombay/fix-canary-global
erwinmombay Feb 6, 2016
f12843d
Provide a robust and tested utility function for doing work only in t…
cramforce Feb 5, 2016
7d823fa
Some premature optimization for amp-slides
LendsMan Feb 5, 2016
824c1d9
Merge pull request #1810 from LendsMan/patch-1
jridgewell Feb 6, 2016
e5ca341
Merge pull request #1815 from cramforce/in-master
cramforce Feb 6, 2016
d6f4721
Extend hiding of ads to ads that left the visible viewport.
cramforce Feb 8, 2016
09c7f2f
Turns out our performance tracking lib does not like 0s
cramforce Feb 8, 2016
581e429
Merge pull request #1833 from cramforce/csi-still-broken
cramforce Feb 8, 2016
45e145b
Merge pull request #1832 from cramforce/hide-outside-viewport
cramforce Feb 8, 2016
dc7fbeb
Add referenced to announce email list.
cramforce Feb 8, 2016
1973ec6
Sort the variables in vendors.js file.
avimehta Feb 8, 2016
1ac78de
Expose richer visibility APIs to AMP ads.
cramforce Feb 8, 2016
0ee4548
Merge pull request #1852 from avimehta/master
cramforce Feb 8, 2016
deb56a7
Merge pull request #1848 from cramforce/invisibility-and-viewability
cramforce Feb 8, 2016
bb04a0c
Adding yieldmo ad network to amp-ad.
Feb 8, 2016
3c5bcc9
Merge pull request #1850 from yieldmo/feature/yieldmo
cramforce Feb 9, 2016
3a315e4
Reduce assumptions regarding node path
jkingyens Feb 9, 2016
0bbad51
Only follow the current branch's parents to find the last tag
erwinmombay Feb 9, 2016
2d75fd5
Merge pull request #1855 from erwinmombay/fix-changelog-tag-diff
erwinmombay Feb 9, 2016
36e0bde
Add 3rd party integration guidelines
jasti Feb 9, 2016
f2bbf3c
Fix typos
cramforce Feb 9, 2016
50d83db
Enable SauceLabs builds on non-PR builds.
cramforce Feb 9, 2016
27f88ca
Merge pull request #1858 from cramforce/sauce-again
cramforce Feb 9, 2016
30d1ec9
Fix Safari-only flake.
cramforce Feb 9, 2016
1ad7692
Merge pull request #1859 from cramforce/timing-out
cramforce Feb 9, 2016
48dee80
Remove extra import
cramforce Feb 9, 2016
6a893ab
2 changes for faster builds
cramforce Feb 9, 2016
ca9d293
Merge pull request #1860 from cramforce/serve-less
cramforce Feb 9, 2016
288fd0e
Merge pull request #1784 from jmadler/samples
jmadler Feb 9, 2016
e51b78b
Minor fixes to amp-image-lightbox.md docs
Feb 9, 2016
6d3a1b6
Merge pull request #1869 from dvoytenko/fixes36
dvoytenko Feb 9, 2016
b1411a1
Load amp-pixel and amp-analytics independent of where on the page the…
cramforce Feb 9, 2016
b755919
Merge pull request #1872 from cramforce/always-analytics
cramforce Feb 9, 2016
317842c
Additional documentation on credentialed CORS
Feb 9, 2016
c4261f8
Merge pull request #1870 from dvoytenko/fixes37
dvoytenko Feb 9, 2016
e654d35
Change URL for preconnect polyfill to explain what is going on.
cramforce Feb 9, 2016
0eb2580
Merge pull request #1873 from cramforce/safari-polyfill-error
cramforce Feb 9, 2016
825f84d
Merge pull request #1857 from jasti/amp_3p_documentation
cramforce Feb 9, 2016
802a33f
Merge pull request #1854 from jkingyens/improve-validate-bin
cramforce Feb 9, 2016
651c6a4
update gulp to shut up the warnings
erwinmombay Feb 9, 2016
3bbd61c
Allow any value for the type attr for the amp-analytics tag.
powdercloud Feb 9, 2016
8505487
Add delay attribute for amp carousel.
erwinmombay Feb 9, 2016
a7bf3bd
Add requirements to <amp-install-serviceworker> tag.
Gregable Feb 9, 2016
11ec8f9
Move the logic for the data- attrs into its own method.
powdercloud Feb 9, 2016
1a08ef6
Fix two closure compilation warnings.
powdercloud Feb 9, 2016
14b706e
Validate URLs for allowed protocols (#1711).
honeybadgerdontcare Feb 9, 2016
ad9f64e
Add a few more required fields to <amp-user-notification> tag to stay in
Gregable Feb 9, 2016
927b0c3
Add support for wordpress rel=attachment syntax.
Gregable Feb 9, 2016
451f746
Reverse change to <amp-user-notification>. The spec was out of date.
Gregable Feb 9, 2016
2a8e186
Merge pull request #1878 from erwinmombay/gulp-update
erwinmombay Feb 9, 2016
919ba58
Loading indicator for amp-embed
Feb 9, 2016
90b2580
Merge pull request #1879 from Gregable/validation
Gregable Feb 9, 2016
8a4d528
Merge pull request #1880 from dvoytenko/fixes38
dvoytenko Feb 9, 2016
109ee49
Set Karma Log Level to WARN
jridgewell Feb 10, 2016
c6031c6
Throttle intersection observer posts to 10 per second.
cramforce Feb 10, 2016
d283c8f
Cache URL parsing results.
cramforce Feb 10, 2016
d804ad3
Reference sourcemaps from GitHub.
cramforce Feb 9, 2016
3c3ee09
Merge pull request #1887 from cramforce/sourcemaps-github
cramforce Feb 10, 2016
5cde679
Merge pull request #1889 from cramforce/throttle-intersection-observer
cramforce Feb 10, 2016
1b25397
Merge pull request #1893 from cramforce/url-perf
cramforce Feb 10, 2016
614262d
Allow referrer override to an empty value
Feb 10, 2016
7d292ee
Update analytics docs with new trigger structure
rudygalfi Feb 10, 2016
f0db228
Merge pull request #1888 from jridgewell/karma-log-level
jridgewell Feb 10, 2016
288778f
Merge pull request #1896 from dvoytenko/access32
dvoytenko Feb 10, 2016
aca34a0
FCF and Metering part of the spec
Feb 10, 2016
8c10f89
Set google_page_url correctly.
bobcassels Feb 10, 2016
52ab8c6
Merge pull request #1897 from ampproject/rudygalfi-analytics-docs
rudygalfi Feb 10, 2016
db7e7cb
Merge pull request #1911 from bobcassels/fix-adsense-google_page_url
cramforce Feb 10, 2016
c3a8f98
Pass all data-param-* attribs for plugin use
mister-ben Dec 16, 2015
14ff6eb
Merge pull request #1909 from BrightcoveOS/amp-brightcove-params
cramforce Feb 10, 2016
a96496d
Launch amp-access
Feb 10, 2016
461c4f2
Merge pull request #1910 from dvoytenko/access33
dvoytenko Feb 10, 2016
4d20b1e
Use a proper correlator value
gduchene Feb 10, 2016
98e453a
Fix bug that would lead to a super large number of "throttled" change…
cramforce Feb 10, 2016
323fa1d
Merge pull request #1921 from cramforce/jank
cramforce Feb 10, 2016
4cbe4ba
User notifications with local storage docs
Jan 29, 2016
b35769b
Temporarily skip dynamic classes tests
erwinmombay Feb 10, 2016
b5343b5
Merge pull request #1675 from dvoytenko/storage3
dvoytenko Feb 10, 2016
63f786b
Merge pull request #1904 from gduchene/master
cramforce Feb 11, 2016
66b5274
Merge pull request #1922 from erwinmombay/skippity-doo-da
erwinmombay Feb 11, 2016
ed1bce3
docs(amp-user-notification): clarify that `ampUserId` may be the stri…
erwinmombay Jan 11, 2016
1a2186b
Merge pull request #1381 from erwinmombay/get-even-if-null
erwinmombay Feb 11, 2016
b729f1c
Add documentation for integrating an analytics service
Feb 4, 2016
e3946a7
Merge pull request #1791 from jmadler/analytics-docs
jmadler Feb 11, 2016
5147d61
Add support for Parsely analytics
msukmanowsky Feb 8, 2016
df0a119
Merge pull request #1595 from Parsely/master
rudygalfi Feb 11, 2016
c2fb9cf
Fix 3 bugs in environment instrumentation
cramforce Feb 11, 2016
b3c8fff
Merge pull request #1928 from cramforce/verge
cramforce Feb 11, 2016
e5ab3f5
Revert "Merge pull request #1909 from BrightcoveOS/amp-brightcove-par…
jridgewell Feb 11, 2016
8b7f8d8
Revert "Merge pull request #1922 from erwinmombay/skippity-doo-da"
jridgewell Feb 11, 2016
e968efa
Merge pull request #1924 from jridgewell/travis-dynamic-css-flake
cramforce Feb 11, 2016
5f0dc86
Allow prerendering amp-video poster.
mkhatib Feb 1, 2016
3ca7703
Call eval with correct context.
cramforce Feb 11, 2016
528547a
Merge pull request #1931 from cramforce/verge2
cramforce Feb 11, 2016
bb3ad90
Merge pull request #1914 from dvoytenko/access-release
dvoytenko Feb 11, 2016
14bc877
Submitted broken example.
cramforce Feb 11, 2016
ae99b63
Merge pull request #1718 from mkhatib/amp-video-poster
mkhatib Feb 11, 2016
3a1ee11
Strong recommendation to return the actual origin in the Access-Contr…
Feb 10, 2016
f8cf99b
Fix flaky timer test by using a mock clock.
cramforce Feb 11, 2016
1a1a42c
Merge pull request #1934 from cramforce/test-fix
erwinmombay Feb 11, 2016
25012be
Merge pull request #1912 from dvoytenko/access34
dvoytenko Feb 11, 2016
15da1bf
3 signficant speedups for iframe communication
cramforce Feb 11, 2016
d11a369
Launch amp-storage experiment
Feb 11, 2016
1a56936
Merge pull request #1943 from dvoytenko/storage-launch
dvoytenko Feb 11, 2016
ba060a6
Merge pull request #1935 from cramforce/verge2
cramforce Feb 11, 2016
64a9c57
add missing pre-connect urls for taboola
nitzanvolman Feb 11, 2016
4760a0f
Merge pull request #1944 from taboola/taboola-pre-connect
cramforce Feb 11, 2016
94e7951
feature(perf): add `setParams` method
erwinmombay Feb 3, 2016
34c5b86
Merge pull request #1862 from erwinmombay/set-query-params
erwinmombay Feb 11, 2016
5ba5bc9
Add error reporting for broken images
camelburrito Feb 11, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 18 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
{
optional: ["utility.inlineEnvironmentVariables"],
externalHelpers: true,
blacklist: ["regenerator"]
"optional": ["utility.inlineEnvironmentVariables"],
"externalHelpers": true,
"whitelist": [
"es3.memberExpressionLiterals",
"es3.propertyLiterals",
"es5.properties.mutators",
"es6.arrowFunctions",
"es6.blockScoping",
"es6.classes",
"es6.constants",
"es6.tailCall",
"es6.modules",
"es6.parameters",
"es6.properties.computed",
"es6.properties.shorthand",
"es6.templateLiterals",
"es6.spread"
]
}
70 changes: 53 additions & 17 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,40 +1,76 @@
{
"parser": "babel-eslint",
"ecmaFeatures": {
"modules": true,
"arrowFunctions": true,
"blockBindings": true,
"forOf": false
"forOf": false,
"destructuring": false,
"spread": false
},
"env": {
"es6": true,
"browser": true
},
"rules": {
"semi": 2,
"google-camelcase/google-camelcase": 2,
"no-eval": 2,
"array-bracket-spacing": [2, "never"],
"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"computed-property-spacing": [2, "never"],
"curly": 2,
"radix": 2,
"no-debugger": 2,
"dot-location": [2, "property"],
"eol-last": 2,
"google-camelcase/google-camelcase": 2,
"indent": [2, 2, { "SwitchCase": 1 }],
"key-spacing": 2,
"max-len": [2, 80, 4, {
"ignoreComments": true,
"ignoreUrls": true,
"ignorePattern": ""
}],
"no-alert": 2,
"no-debugger": 2,
"no-div-regex": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-implicit-coercion": [2, { "boolean": false }],
"no-implied-eval": 2,
"no-native-reassign": 2,
"no-lone-blocks": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-warning-comments": [2, { "terms": ["do not submit"], "location": "anywhere" }],
"wrap-iife": [2, "any"],
"no-unused-expressions": 0,
"no-iterator": 2,
"no-lone-blocks": 2,
"no-multi-spaces": 2,
"no-native-reassign": 2,
"no-redeclare": 2,
"no-script-url": 2,
"no-implicit-coercion": [2, { "boolean": false }],
"no-useless-concat": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-spaced-func": 2,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-unused-expressions": 0,
"no-unused-vars": [2, {
"argsIgnorePattern": "^var_|opt_|unused",
"varsIgnorePattern": "AmpElement|Def|Interface$"
}],
"no-useless-call": 2,
"no-div-regex": 2,
"max-len": [2, 80, 4, { "ignoreComments": true, "ignoreUrls": false, "ignorePattern": "" }]
"no-useless-concat": 2,
"no-var": 2,
"no-warning-comments": [2, { "terms": ["do not submit"], "location": "anywhere" }],
"object-curly-spacing": [2, "never", {
"objectsInObjects": false,
"arraysInObjects": false
}],
"prefer-const": 2,
"radix": 2,
"semi": 2,
"space-after-keywords": 2,
"space-before-blocks": 2,
"space-before-function-paren": [2, "never"],
"space-before-keywords": 2,
"space-in-parens": 2,
"space-infix-ops": 2,
"space-unary-ops": [1, { "words": true, "nonwords": false }],
"space-return-throw-case": 2,
"wrap-iife": [2, "any"]
}
}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store
.g4ignore
build
c
dist
dist.ads
dist.3p
dist.tools
examples.build
examples.min
node_modules
npm-debug.log
npm-debug.log
.idea
35 changes: 32 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,48 @@
language: node_js
sudo: required # See http://docs.travis-ci.com/user/trusty-ci-environment/
dist: trusty
node_js:
- "stable"
python:
- "2.7"
notifications:
webhooks:
- http://savage.nonblocking.io:8080/savage/travis
addons:
sauce_connect: true
hosts:
- ads.localhost
- iframe.localhost
apt:
packages:
- protobuf-compiler
- python-protobuf
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- npm install -g gulp
- pip install --user protobuf
script:
- gulp presubmit
- gulp lint
- gulp build
- gulp minify
- gulp test
- gulp dist
- gulp presubmit
# Unit tests with Travis' default chromium
- gulp test --compiled
# Integration tests with all saucelabs browsers
- gulp test --saucelabs --integration --compiled
# All unit tests with an old chrome (best we can do right now to pass tests
# and not start relying on new features).
# Disabled because it regressed. Better to run the other saucelabs tests.
# - gulp test --saucelabs --oldchrome
- gulp validator
branches:
only:
- master
- release
- canary
env:
global:
- NPM_CONFIG_PROGRESS="false"
63 changes: 63 additions & 0 deletions 3p/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Inclusion of third party software, embeds, and services into AMP

In general all inclusions are subject to [CONTRIBUTING.md](../CONTRIBUTING.md). This files outlines specific rules for certain types of external embed and other software inclusions.

In order to qualify for inclusion, an extended component that integrates a third-party service must generally meet the notability requirements of the English Wikipedia, and is in common use in Internet publishing. As a rough rule of thumb, it should be used or requested by 5% of the top 10,000 websites as noted on builtwith.com, or already integrated into [oEmbed](http://oembed.com/).

We highly prefer integrations that do not use iframes. JSONP cannot be used for security reasons, but CORS requests are perfectly fine.

## Embeds

Examples: Youtube, Vimeo videos; Tweets, Instagrams; comment systems; polls; quizzes; document viewers

- Our intent is to provide first class support for all embeds that fulfill the notability guidelines laid out in [CONTRIBUTING.md](../CONTRIBUTING.md).
- Consider whether a iframe-with-placeholder solution fits your use case where iframe generation is not done immediately (can be done before user action for instant loading of iframe).
- Consider whether all that is needed is some documentation for how to use the embed with `amp-iframe`.
- Iframes and all sub resources must be served from HTTPS.
- Avoid client side rendering of iframe content.
- If your use of iframes is for style isolation, consider that AMP might provide an iframe-free alternative.
- If you can make it not-iframe-based that is much better. (See e.g. the pinterest embed). We will always ask to do this first. E.g. adding a CORS endpoint to your server might make this possible.
- Must play well within [AMP's sizing framework](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
- All JS on container page must be open source and bundled with AMP.
- Direct iframe embeds not using our 3p iframe mechanism (used e.g. for ads) are preferred.
- JavaScript loaded into iframe should be reasonable with respect to functionality.
- Use the `sandbox` attribute on iframe if possible.
- Provide unit and integration tests.
- Embeds that require browser plugins, such as Flash, Java, ActiveX, Silverlight, etc. are disallowed unless necessary. Special review required. We cannot currently see a reason why these should be allowed.

## Ads

- We welcome pull requests by all ad networks for inclusion into AMP.
- All ads and all sub resources must be served from HTTPS.
- Must play well within [AMP's sizing framework](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
- Direct iframe embeds not using our 3p iframe mechanism (used by most ads) are preferred.
- Providing an optional image only zero-iframe embed is appreciated.
- Support viewability and other metrics/instrumentation as supplied by AMP (via postMessage API)
- Try to keep overall iframe count at one per ad. Explain why more are needed.
- Share JS between iframes on the same page.
- Provide unit and integration tests.
- Provide test accounts for inclusion in our open source repository for integration tests.

The following aren't hard requirements, but are performance optimizations we should strive to incorporate. Please provide a timeline as to when you expect to follow these guidelines:

- Support pause and play APIs to turn animations on and off. Ideally also to interrupt loading.
- Never block the UI thread for longer than 50ms, so that user action is never blocked for longer than that.
- Keep individual JS files small enough, so they compile in under 50ms on a 2013 Android phone.
- Split up other expensive work, so it can be interrupted at 50ms boundary.
- Creatives should only use animations drive by CSS animation frame.
- Creatives should only animate using CSS transforms and opacity.
- When creatives animate they should not use more than 2ms time per frame to allow for other animations to have sufficient time for concurrent animations.

The better an ad network does on the above requirements, the earlier ads from it will be loaded into AMP. In other words: *The slower the ad loads and the more it interferes with the page, the later AMP will load it.*

We are also excited to start conversations how modern web tech could improve overall ads latency, memory usage and framerate impact and how AMP's open source model could be used to inject trust through an auditable common code base into the ads ecosystem which would reduce the necessity of redundant metrics collection.

Review the [ads/README](../ads/README.md) for further details on ad integration.

## Fonts

- AMP allows inclusion of fonts via the `@font-face` directive.
- JavaScript can not be involved with the initiation of font loading.
- Font loading gets controlled (but not initiated) by [`<amp-font>`](https://github.com/ampproject/amphtml/issues/648).
- AMP by default does not allow inclusion of external stylesheets, but it is happy to whitelist URL prefixes of font providers for font inclusion via link tags. These link tags and their fonts must be served via HTTPS.
- If a font provider does referrer based "security" it needs to whitelist the AMP proxy origins before being included in the link tag whitelist. AMP proxy sends the appropriate referrer header such as "https://cdn.ampproject.org".
Loading