/* @flow */

let decoder

export function decode (html: string): string {
decoder = decoder || document.createElement('div')
decoder.innerHTML = html
return decoder.textContent
}

vue.js 源代码学习笔记 ----- decoder的更多相关文章

  1. vue.js 源代码学习笔记 ----- html-parse.js

    /** * Not type-checking this file because it's mostly vendor code. */ /*! * HTML Parser By John Resi ...

  2. vue.js 源代码学习笔记 ----- 工具方法 lang

    /* @flow */ // Object.freeze 使得这个对象不能增加属性, 修改属性, 这样就保证了这个对象在任何时候都是空的 export const emptyObject = Obje ...

  3. vue.js 源代码学习笔记 ----- 工具方法 env

    /* @flow */ /* globals MutationObserver */ import { noop } from 'shared/util' // can we use __proto_ ...

  4. vue.js 源代码学习笔记 ----- helpers.js

    /* @flow */ import { parseFilters } from './parser/filter-parser' export function baseWarn (msg: str ...

  5. vue.js 源代码学习笔记 ----- instance render

    /* @flow */ import { warn, nextTick, toNumber, _toString, looseEqual, emptyObject, handleError, loos ...

  6. vue.js 源代码学习笔记 ----- instance event

    /* @flow */ import { updateListeners } from '../vdom/helpers/index' import { toArray, tip, hyphenate ...

  7. vue.js 源代码学习笔记 ----- instance init

    /* @flow */ import config from '../config' import { initProxy } from './proxy' import { initState } ...

  8. vue.js 源代码学习笔记 ----- instance index

    import { initMixin } from './init' import { stateMixin } from './state' import { renderMixin } from ...

  9. vue.js 源代码学习笔记 ----- instance state

    /* @flow */ import Dep from '../observer/dep' import Watcher from '../observer/watcher' import { set ...

随机推荐

  1. OC最基础的系统转场动画

    SystemAnimationViewController *system = [SystemAnimationViewController new]; CATransition *animation ...

  2. git-【三】理解工作区与暂存区的区别

    基本概念 工作区:就是你在电脑上看到的目录,比如目录下testgit里的文件(.git隐藏目录版本库除外).或者以后需要再新建的目录文件等等都属于工作区范畴.       版本库(Repository ...

  3. [Axiom 3D]2.Axiom 基本概念

    1.Root Root 对象是一个 Ogre 应用程序的主入口点.因为它是整个 Ogre 引擎的外观(Façade )类(请参考设计模式中的外观模式),所以在这里作为第一个被列出来的类,它提供了方便的 ...

  4. WMS学习笔记:2.WMS解析

    WMS 定义了三个操作,分别是:GetCapabilities,GetMap和GetFeatureInfo.其中,GetFeatureInfo是可选的.本条款规定了在超文本传输协议(HTTP)分布式计 ...

  5. Selenium IDE脚本录制步骤简介

    录制脚本步骤: 1.打开Selenium IDE,输入需要录制脚本的地址,然后启动Firefox,输入selenium IDE需录制的地址,根据实际需求,做相关操作: 2.录制过程中,会发现做的相关操 ...

  6. MISC-WHCTF2016-crypto100

    题目:李二狗的梦中情人  找不同! 如图,下载得到“nvshen.png” 流程:看到这个被命名为nvshen的文件,感觉文件本身会有东西.用16进制查看器在图片的末尾发现了一串类似URL的ASCII ...

  7. Java多线程(三)

    本文主要接着前面多线程的两篇文章总结Java多线程中的线程安全问题. 一.一个典型的Java线程安全例子 1 public class ThreadTest { 2 3 public static v ...

  8. html canvas 圆弧

    contxt.arc(x, y , r, 0 , 弧 1.5*Math.PI PI要注意大小写 , 顺时针=false 逆时针 true) 例如  context.arc(300, 300, 200, ...

  9. [ 翻译]ruby rails相关的常见服务器

    原文:http://stackoverflow.com/questions/4113299/ruby-on-rails-server-options     一,Apache vs Nginx     ...

  10. linux_一些shell命令分析记录

    一.用于shell脚本的界面命令交互 echo "请输入css-dist下载地址:" read addcss echo "开始下载css的zip包"( wget ...