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

Function createValidRule

test/unit/test-fixed-layer.js:391–403  ·  view source on GitHub ↗
(selector, position, elements)

Source from the content-addressed store, hash-verified

389 }
390
391 function createValidRule(selector, position, elements) {
392 const rule = {
393 type: 1,
394 selectorText: selector,
395 style: {position},
396 elements,
397 };
398 if (allRules[selector]) {
399 throw new Error('dup selector');
400 }
401 allRules[selector] = rule;
402 return rule;
403 }
404
405 function createUnrelatedRule(selector, elements) {
406 const rule = {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected