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
<HtmlMapper | |
html={html} | |
// now we'll accept tags like strong by default, | |
// but at the cost of predictibility and security. | |
acceptUnknown | |
> | |
{{ p: Body }} | |
</HtmlMapper> |
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
<HtmlMapper html={html}> | |
{{ | |
p: Body, | |
... | |
strong: null, | |
ul: null, | |
li: null, | |
br: null, | |
}} | |
</HtmlMapper> |
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 tagMap = { p: Body, h1: ... }; | |
return ( | |
<> | |
<HtmlMapper html={intro}> | |
{{ | |
...tagMap, | |
p: ({ ...props }) => <Body variant="large" {...props} />, | |
}} | |
</HtmlMapper> | |
<HtmlMapper html={text}>{tagMap}</HtmlMapper> |
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
<HtmlMapper html={html}> | |
{{ | |
p: Body, | |
h1: (props) => <Title variant="large" {...props} />, | |
h2: (props) => <Title variant="regular" {...props} />, | |
h3: (props) => <Title variant="small" {...props} />, | |
h4: (props) => <Title variant="micro" {...props} />, | |
h5: (props) => <Title variant="tiny" {...props} />, | |
a: ({ href, children, ...rest }) => | |
href?.startsWith("/") ? ( |
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
[ | |
{ | |
"elementType": "geometry", | |
"stylers": [ | |
{ | |
"color": "#22994b" | |
} | |
] | |
}, | |
{ |
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 real = chrome.cast.requestSession; | |
chrome.cast.requestSession = (success, ...dontcare) => { | |
real(session => { | |
console.log('intercepted session!', session); | |
for (let namespace of session.namespaces) { | |
console.log('listening on', namespace.name); | |
session.addMessageListener(namespace.name, (namespace, message) => console.log('<=', namespace, JSON.parse(message))); | |
const realSend = session.sendMessage; | |
session.sendMessage = (namespace, message, ...whatever) => { | |
console.log('=>', namespace, message); |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<link rel="import" href="../paper-input/paper-input.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> |
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
<link rel="import" href="../paper-button/paper-button.html"> | |
<link rel="import" href="../paper-checkbox/paper-checkbox.html"> | |
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
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
<link rel="import" href="../core-input/core-input.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |