lib/kissy/5.0.0-alpha.3/build/html-parser-debug.js
function Parser(html, opts) {
        // fake root node
        html = util.trim(html);
        this.originalHTML = html;    // only allow condition
                                     // 1. start with <!doctype
                                     // 2. start with <!html
                                     // 3. start with <!body
                                     // 4. not start with <head
                                     // 5. not start with <meta
        // only allow condition
        // 1. start with <!doctype
        // 2. start with <!html
        // 3. start with <!body
        // 4. not start with <head
        // 5. not start with <meta
        if (/^(<!doctype|<html|<body)/i.test(html)) {
            html = '<document>' + html + '</document>';
        } else {
            html = '<body>' + html + '</body>';
        }
        this.lexer = new Lexer(html);
        this.opts = opts || {};
    }
function Parser(html, opts) {
        // fake root node
        html = util.trim(html);
        this.originalHTML = html;    // only allow condition
                                     // 1. start with <!doctype
                                     // 2. start with <!html
                                     // 3. start with <!body
                                     // 4. not start with <head
                                     // 5. not start with <meta
        // only allow condition
        // 1. start with <!doctype
        // 2. start with <!html
        // 3. start with <!body
        // 4. not start with <head
        // 5. not start with <meta
        if (/^(<!doctype|<html|<body)/i.test(html)) {
            html = '<document>' + html + '</document>';
        } else {
            html = '<body>' + html + '</body>';
        }
        this.lexer = new Lexer(html);
        this.opts = opts || {};
    }
function Parser ( html , opts ) { // fake root node html = util . trim ( html ) ; this . originalHTML = html ; // only allow condition // 1. start with <!doctype // 2. start with <!html // 3. start with <!body // 4. not start with <head // 5. not start with <meta // only allow condition // 1. start with <!doctype // 2. start with <!html // 3. start with <!body // 4. not start with <head // 5. not start with <meta if ( / ^(<!doctype|<html|<body) / i . test ( html ) ) { html = '<document>' + html + '</document>' ; } else { html = '<body>' + html + '</body>' ; } this . lexer = new Lexer ( html ) ; this . opts = opts || { } ; }
Html Parse Class
@param html
@param opts
@class KISSY.HtmlParser.Parser
 
Html Parse Class
@param html
@param opts
@class KISSY.HtmlParser.Parser
Html Parse Class