MCPcopy Index your code
hub / github.com/ampproject/amphtml / generateAttributes

Function generateAttributes

test/unit/test-amp-context.js:414–431  ·  view source on GitHub ↗
(opt_sentinel)

Source from the content-addressed store, hash-verified

412}
413
414function generateAttributes(opt_sentinel) {
415 const name = {};
416 name.attributes = {};
417 const sentinel = opt_sentinel || '1-291921';
418 name.attributes._context = {
419 location: {
420 href: 'https://foo.com/a?b=c',
421 },
422 canonicalUrl: 'https://bar.com',
423 pageViewId: '1',
424 pageViewId64: 'abcdef',
425 sentinel,
426 startTime: 0,
427 referrer: 'baz.net',
428 };
429
430 return name;
431}
432
433function generateSerializedAttributesA4A(opt_sentinel) {
434 return JSON.stringify(generateAttributesA4A(opt_sentinel));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected