Skip to content

Instantly share code, notes, and snippets.

View senthilp's full-sized avatar

Senthil Padmanabhan senthilp

View GitHub Profile
@senthilp
senthilp / dabblet.css
Created December 16, 2011 00:40
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
alert('Hello World');
/*
* Copyright 2011 eBay Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
<!-- Clicking on this button will open the modal dialog -->
<button on="click:ebay-modal">Open</button>
<div id="ebay-modal" modal width="400" height="300" controls>
<!-- Modal markup goes here-->
</div>
async function asyncFun () {
const value = await Promise
.resolve(1);
console.log(typeof value); // number
return value;
}
const value = asyncFun();
console.log(typeof value); // object
<!-- This is not recommended -->
<my-carousel
data-config='{"controls": true, "index": 2, "autoplay": true, "labelNext": "next", "labelPrevious": "previous"}'
data-items='[{"title":"Item 1", ..}, {"title": "Item 2", ...}]'>
</my-carousel>
<carousel index="2" controls aria-label-next="next" aria-label-previous="previous" autoplay>
<div>Markup for Item 1</div>
<div>Markup for Item 2</div>
...
</carousel>
<dropdown list="options" index="0">
<datalist id="options">
<option value="--Select--">
<option value="Option 1">
<option value="Option 2">
<option value="Option 3">
<option value="Option 4">
<option value="Option 5">
</datalist>
</dropdown>
<dropdown-menu list="options" index="0">
<option value="0" selected>--Select--</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
</dropdown-menu>
<analytics>
<script type="application/json">
{
"requests": {
"pageview": "https://example.com/analytics?pid=",
"event": "https://example.com/analytics?eid="
},
"vars": {
"account": "ABC123"
},