This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| function value(value, unit) { | |
| return { | |
| type: 'value', | |
| value, | |
| unit | |
| }; | |
| } | |
| function splitArgs(args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="module"> | |
| import {MyElement} from './my-element.html#definition'; | |
| document.body.appendChild(new MyElement()); | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <!-- A host directive applies associated part changes to the host element, if any --> | |
| <template directive="host" class="{{foo}} bar" prop$="{{value}}"></template> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Fooable: DomainExtender<Foo, {}> = ({ Alpha, Beta }) => { | |
| const a = new Alpha(); | |
| const AlphaWithFoo = class extends Alpha { | |
| constructor(...args: any[]) { | |
| super(...args); | |
| } | |
| foo: string = 'foo'; | |
| }; | |
| return { Alpha: AlphaWithFoo, Beta }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <!-- This element does not expect to be used in a template instance, but | |
| does require that it be furnished with a template child in order to | |
| render internally --> | |
| <third-party-infinite-list-element> | |
| <template> | |
| <some-list-item> | |
| </template> | |
| </third-part-infinite-list-element> | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <needle-element name="x-foo"> | |
| <template> | |
| <!-- A host directive applies associated part changes to the host element, if any --> | |
| <template directive="host" class="{{foo}} bar" prop$="{{value}}"></template> | |
| <!-- A compute directive computes a value from several inputs and assigns the result to a property key --> | |
| <template directive="compute" expression="{{computeState(foo, bar, baz)}}" result="state"></template> | |
| <ul> | |
| <!-- A foreach directive renders a list of items --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // /foo/1.0/namemap.json | |
| { | |
| "packages": { | |
| "bar": "../../bar/1.0", | |
| "baz": "../../baz/1.0" | |
| } | |
| } | |
| // /bar/1.0/namemap.json | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const applyMixins = (BaseClass, ...mixins) => { | |
| let Implementation = BaseClass; | |
| for (mixin of mixins) { | |
| Implementation = mixin(Implementation); | |
| } | |
| return Implementation; | |
| } | |
| // Later... | |
| const alphaMixin = SuperClass => class extends SuperClass { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function FixturedTest(TestImplementation) { | |
| return class extends TestImplementation { | |
| async wind(context) { | |
| const testContext = await super.wind(context); | |
| const { implementation } = testContext; | |
| const { topic } = this; | |
| const fixtureContext = topic != null ? topic.createContext() : {}; | |
| return Object.assign({}, testContext, { fixtureContext, implementation: (...args) => implementation(...args, fixtureContext) }); | |
| } | |
| async unwind(context) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "manifest_version": 2, | |
| "name": "MoreMediaBox", | |
| "version": "1.0", | |
| "content_scripts": [{ | |
| "matches": ["*://*.mymediabox.com/*"], | |
| "all_frames": true, | |
| "css": ["./more-media-box.css"] | |
| }] | |
| } |