This file contains 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
/** | |
* Updates the passed dialog to retain focus and restore it when the dialog is closed. Won't | |
* upgrade a dialog more than once. Supports IE11+ and is a no-op otherwise. | |
* @param {!HTMLDialogElement} dialog to upgrade | |
*/ | |
window.registerFocusRestoreDialog = (function() { | |
var WeakMap = window.WeakMap; | |
var registered = | |
typeof WeakMap === 'function' | |
? new WeakMap() |
CSSのtext-emphasis
プロパティは、圏点(文字の上や右に点がくっついてるアレ)を表示するためのものだ。
現在(2018年3月29日時点で)、殆どのWebブラウザが(ChromeやOperaは未だに-webkit-
プレフィックスが必要なものの)対応している。
だが、IEやEdge、Android版Firefox、それに JSすらマトモに動かせないクソブラウザの Opera Miniは対応していない。
This file contains 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
/** | |
* @param {!Node} targetNode Markdownに変換するDOMノード | |
* @param {boolean} childOnly trueの場合、DOMノードの子要素のみを変換する | |
* @return {string} | |
*/ | |
function dom2markdown(targetNode, childOnly=false) { | |
/** | |
* 文字列をMarkdown用にエスケープする | |
* @param {string} text エスケープする文字列 | |
* @param {string} escapeChar エスケープする文字 |