omi v1.4.1 - change soda-bind-html to soda-html
This commit is contained in:
parent
e514f9bea7
commit
6784d0e8df
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Omi v1.4.0 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* Omi v1.4.1 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* MIT Licensed.
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
|
@ -138,14 +138,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Shim for "fixing" IE's lack of support (IE < 9) for applying slice
|
||||
* on host objects like NamedNodeMap, NodeList, and HTMLCollection
|
||||
* (technically, since host objects have been implementation-dependent,
|
||||
* at least before ES6, IE hasn't needed to work this way).
|
||||
* Also works on strings, fixes IE < 9 to allow an explicit undefined
|
||||
* for the 2nd argument (as in Firefox), and prevents errors when
|
||||
* called on other DOM objects.
|
||||
/**
|
||||
* Shim for "fixing" IE's lack of support (IE < 9) for applying slice
|
||||
* on host objects like NamedNodeMap, NodeList, and HTMLCollection
|
||||
* (technically, since host objects have been implementation-dependent,
|
||||
* at least before ES6, IE hasn't needed to work this way).
|
||||
* Also works on strings, fixes IE < 9 to allow an explicit undefined
|
||||
* for the 2nd argument (as in Firefox), and prevents errors when
|
||||
* called on other DOM objects.
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
@ -444,9 +444,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
/*!
|
||||
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
||||
* http://github.com/janl/mustache.js
|
||||
/*!
|
||||
* mustache.js - Logic-less {{mustache}} templates with JavaScript
|
||||
* http://github.com/janl/mustache.js
|
||||
*/
|
||||
|
||||
/*global define: false Mustache: true*/
|
||||
|
@ -471,9 +471,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return typeof object === 'function';
|
||||
}
|
||||
|
||||
/**
|
||||
* More correct typeof string handling array
|
||||
* which normally returns typeof 'object'
|
||||
/**
|
||||
* More correct typeof string handling array
|
||||
* which normally returns typeof 'object'
|
||||
*/
|
||||
function typeStr(obj) {
|
||||
return isArray(obj) ? 'array' : typeof obj === 'undefined' ? 'undefined' : _typeof(obj);
|
||||
|
@ -483,9 +483,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
|
||||
}
|
||||
|
||||
/**
|
||||
* Null safe way of checking whether or not an object,
|
||||
* including its prototype, has a given property
|
||||
/**
|
||||
* Null safe way of checking whether or not an object,
|
||||
* including its prototype, has a given property
|
||||
*/
|
||||
function hasProperty(obj, propName) {
|
||||
return obj != null && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && propName in obj;
|
||||
|
@ -526,27 +526,27 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
var curlyRe = /\s*\}/;
|
||||
var tagRe = /#|\^|\/|>|\{|&|=|!/;
|
||||
|
||||
/**
|
||||
* Breaks up the given `template` string into a tree of tokens. If the `tags`
|
||||
* argument is given here it must be an array with two string values: the
|
||||
* opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of
|
||||
* course, the default is to use mustaches (i.e. mustache.tags).
|
||||
*
|
||||
* A token is an array with at least 4 elements. The first element is the
|
||||
* mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag
|
||||
* did not contain a symbol (i.e. {{myValue}}) this element is "name". For
|
||||
* all text that appears outside a symbol this element is "text".
|
||||
*
|
||||
* The second element of a token is its "value". For mustache tags this is
|
||||
* whatever else was inside the tag besides the opening symbol. For text tokens
|
||||
* this is the text itself.
|
||||
*
|
||||
* The third and fourth elements of the token are the start and end indices,
|
||||
* respectively, of the token in the original template.
|
||||
*
|
||||
* Tokens that are the root node of a subtree contain two more elements: 1) an
|
||||
* array of tokens in the subtree and 2) the index in the original template at
|
||||
* which the closing tag for that section begins.
|
||||
/**
|
||||
* Breaks up the given `template` string into a tree of tokens. If the `tags`
|
||||
* argument is given here it must be an array with two string values: the
|
||||
* opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of
|
||||
* course, the default is to use mustaches (i.e. mustache.tags).
|
||||
*
|
||||
* A token is an array with at least 4 elements. The first element is the
|
||||
* mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag
|
||||
* did not contain a symbol (i.e. {{myValue}}) this element is "name". For
|
||||
* all text that appears outside a symbol this element is "text".
|
||||
*
|
||||
* The second element of a token is its "value". For mustache tags this is
|
||||
* whatever else was inside the tag besides the opening symbol. For text tokens
|
||||
* this is the text itself.
|
||||
*
|
||||
* The third and fourth elements of the token are the start and end indices,
|
||||
* respectively, of the token in the original template.
|
||||
*
|
||||
* Tokens that are the root node of a subtree contain two more elements: 1) an
|
||||
* array of tokens in the subtree and 2) the index in the original template at
|
||||
* which the closing tag for that section begins.
|
||||
*/
|
||||
function parseTemplate(template, tags) {
|
||||
if (!template) return [];
|
||||
|
@ -666,9 +666,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return nestTokens(squashTokens(tokens));
|
||||
}
|
||||
|
||||
/**
|
||||
* Combines the values of consecutive text tokens in the given `tokens` array
|
||||
* to a single token.
|
||||
/**
|
||||
* Combines the values of consecutive text tokens in the given `tokens` array
|
||||
* to a single token.
|
||||
*/
|
||||
function squashTokens(tokens) {
|
||||
var squashedTokens = [];
|
||||
|
@ -691,11 +691,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return squashedTokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Forms the given array of `tokens` into a nested tree structure where
|
||||
* tokens that represent a section have two additional items: 1) an array of
|
||||
* all tokens that appear in that section and 2) the index in the original
|
||||
* template that represents the end of that section.
|
||||
/**
|
||||
* Forms the given array of `tokens` into a nested tree structure where
|
||||
* tokens that represent a section have two additional items: 1) an array of
|
||||
* all tokens that appear in that section and 2) the index in the original
|
||||
* template that represents the end of that section.
|
||||
*/
|
||||
function nestTokens(tokens) {
|
||||
var nestedTokens = [];
|
||||
|
@ -726,9 +726,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return nestedTokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple string scanner that is used by the template parser to find
|
||||
* tokens in template strings.
|
||||
/**
|
||||
* A simple string scanner that is used by the template parser to find
|
||||
* tokens in template strings.
|
||||
*/
|
||||
function Scanner(string) {
|
||||
this.string = string;
|
||||
|
@ -736,16 +736,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
this.pos = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if the tail is empty (end of string).
|
||||
/**
|
||||
* Returns `true` if the tail is empty (end of string).
|
||||
*/
|
||||
Scanner.prototype.eos = function eos() {
|
||||
return this.tail === '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Tries to match the given regular expression at the current position.
|
||||
* Returns the matched text if it can match, the empty string otherwise.
|
||||
/**
|
||||
* Tries to match the given regular expression at the current position.
|
||||
* Returns the matched text if it can match, the empty string otherwise.
|
||||
*/
|
||||
Scanner.prototype.scan = function scan(re) {
|
||||
var match = this.tail.match(re);
|
||||
|
@ -760,9 +760,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Skips all text until the given regular expression can be matched. Returns
|
||||
* the skipped string, which is the entire tail if no match can be made.
|
||||
/**
|
||||
* Skips all text until the given regular expression can be matched. Returns
|
||||
* the skipped string, which is the entire tail if no match can be made.
|
||||
*/
|
||||
Scanner.prototype.scanUntil = function scanUntil(re) {
|
||||
var index = this.tail.search(re),
|
||||
|
@ -786,9 +786,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return match;
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents a rendering context by wrapping a view object and
|
||||
* maintaining a reference to the parent context.
|
||||
/**
|
||||
* Represents a rendering context by wrapping a view object and
|
||||
* maintaining a reference to the parent context.
|
||||
*/
|
||||
function Context(view, parentContext) {
|
||||
this.view = view;
|
||||
|
@ -796,17 +796,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
this.parent = parentContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new context using the given view with this context
|
||||
* as the parent.
|
||||
/**
|
||||
* Creates a new context using the given view with this context
|
||||
* as the parent.
|
||||
*/
|
||||
Context.prototype.push = function push(view) {
|
||||
return new Context(view, this);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the value of the given name in this context, traversing
|
||||
* up the context hierarchy if the value is absent in this context's view.
|
||||
/**
|
||||
* Returns the value of the given name in this context, traversing
|
||||
* up the context hierarchy if the value is absent in this context's view.
|
||||
*/
|
||||
Context.prototype.lookup = function lookup(name) {
|
||||
var cache = this.cache;
|
||||
|
@ -826,16 +826,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
names = name.split('.');
|
||||
index = 0;
|
||||
|
||||
/**
|
||||
* Using the dot notion path in `name`, we descend through the
|
||||
* nested objects.
|
||||
*
|
||||
* To be certain that the lookup has been successful, we have to
|
||||
* check if the last object in the path actually has the property
|
||||
* we are looking for. We store the result in `lookupHit`.
|
||||
*
|
||||
* This is specially necessary for when the value has been set to
|
||||
* `undefined` and we want to avoid looking up parent contexts.
|
||||
/**
|
||||
* Using the dot notion path in `name`, we descend through the
|
||||
* nested objects.
|
||||
*
|
||||
* To be certain that the lookup has been successful, we have to
|
||||
* check if the last object in the path actually has the property
|
||||
* we are looking for. We store the result in `lookupHit`.
|
||||
*
|
||||
* This is specially necessary for when the value has been set to
|
||||
* `undefined` and we want to avoid looking up parent contexts.
|
||||
**/
|
||||
while (value != null && index < names.length) {
|
||||
if (index === names.length - 1) lookupHit = hasProperty(value, names[index]);
|
||||
|
@ -860,25 +860,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return value;
|
||||
};
|
||||
|
||||
/**
|
||||
* A Writer knows how to take a stream of tokens and render them to a
|
||||
* string, given a context. It also maintains a cache of templates to
|
||||
* avoid the need to parse the same template twice.
|
||||
/**
|
||||
* A Writer knows how to take a stream of tokens and render them to a
|
||||
* string, given a context. It also maintains a cache of templates to
|
||||
* avoid the need to parse the same template twice.
|
||||
*/
|
||||
function Writer() {
|
||||
this.cache = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all cached templates in this writer.
|
||||
/**
|
||||
* Clears all cached templates in this writer.
|
||||
*/
|
||||
Writer.prototype.clearCache = function clearCache() {
|
||||
this.cache = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* Parses and caches the given `template` and returns the array of tokens
|
||||
* that is generated from the parse.
|
||||
/**
|
||||
* Parses and caches the given `template` and returns the array of tokens
|
||||
* that is generated from the parse.
|
||||
*/
|
||||
Writer.prototype.parse = function parse(template, tags) {
|
||||
var cache = this.cache;
|
||||
|
@ -889,14 +889,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return tokens;
|
||||
};
|
||||
|
||||
/**
|
||||
* High-level method that is used to render the given `template` with
|
||||
* the given `view`.
|
||||
*
|
||||
* The optional `partials` argument may be an object that contains the
|
||||
* names and templates of partials that are used in the template. It may
|
||||
* also be a function that is used to load partial templates on the fly
|
||||
* that takes a single argument: the name of the partial.
|
||||
/**
|
||||
* High-level method that is used to render the given `template` with
|
||||
* the given `view`.
|
||||
*
|
||||
* The optional `partials` argument may be an object that contains the
|
||||
* names and templates of partials that are used in the template. It may
|
||||
* also be a function that is used to load partial templates on the fly
|
||||
* that takes a single argument: the name of the partial.
|
||||
*/
|
||||
Writer.prototype.render = function render(template, view, partials) {
|
||||
var tokens = this.parse(template);
|
||||
|
@ -904,14 +904,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return this.renderTokens(tokens, context, partials, template);
|
||||
};
|
||||
|
||||
/**
|
||||
* Low-level method that renders the given array of `tokens` using
|
||||
* the given `context` and `partials`.
|
||||
*
|
||||
* Note: The `originalTemplate` is only ever used to extract the portion
|
||||
* of the original template that was contained in a higher-order section.
|
||||
* If the template doesn't use higher-order sections, this argument may
|
||||
* be omitted.
|
||||
/**
|
||||
* Low-level method that renders the given array of `tokens` using
|
||||
* the given `context` and `partials`.
|
||||
*
|
||||
* Note: The `originalTemplate` is only ever used to extract the portion
|
||||
* of the original template that was contained in a higher-order section.
|
||||
* If the template doesn't use higher-order sections, this argument may
|
||||
* be omitted.
|
||||
*/
|
||||
Writer.prototype.renderTokens = function renderTokens(tokens, context, partials, originalTemplate) {
|
||||
var buffer = '';
|
||||
|
@ -998,25 +998,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
// All high-level mustache.* functions use this writer.
|
||||
var defaultWriter = new Writer();
|
||||
|
||||
/**
|
||||
* Clears all cached templates in the default writer.
|
||||
/**
|
||||
* Clears all cached templates in the default writer.
|
||||
*/
|
||||
mustache.clearCache = function clearCache() {
|
||||
return defaultWriter.clearCache();
|
||||
};
|
||||
|
||||
/**
|
||||
* Parses and caches the given template in the default writer and returns the
|
||||
* array of tokens it contains. Doing this ahead of time avoids the need to
|
||||
* parse templates on the fly as they are rendered.
|
||||
/**
|
||||
* Parses and caches the given template in the default writer and returns the
|
||||
* array of tokens it contains. Doing this ahead of time avoids the need to
|
||||
* parse templates on the fly as they are rendered.
|
||||
*/
|
||||
mustache.parse = function parse(template, tags) {
|
||||
return defaultWriter.parse(template, tags);
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the `template` with the given `view` and `partials` using the
|
||||
* default writer.
|
||||
/**
|
||||
* Renders the `template` with the given `view` and `partials` using the
|
||||
* default writer.
|
||||
*/
|
||||
mustache.render = function render(template, view, partials) {
|
||||
if (typeof template !== 'string') {
|
||||
|
@ -1944,15 +1944,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if two node's names are the same.
|
||||
*
|
||||
* NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same
|
||||
* nodeName and different namespace URIs.
|
||||
*
|
||||
* @param {Element} a
|
||||
* @param {Element} b The target element
|
||||
* @return {boolean}
|
||||
/**
|
||||
* Returns true if two node's names are the same.
|
||||
*
|
||||
* NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same
|
||||
* nodeName and different namespace URIs.
|
||||
*
|
||||
* @param {Element} a
|
||||
* @param {Element} b The target element
|
||||
* @return {boolean}
|
||||
*/
|
||||
function compareNodeNames(fromEl, toEl) {
|
||||
var fromNodeName = fromEl.nodeName;
|
||||
|
@ -1973,21 +1973,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an element, optionally with a known namespace URI.
|
||||
*
|
||||
* @param {string} name the element name, e.g. 'div' or 'svg'
|
||||
* @param {string} [namespaceURI] the element's namespace URI, i.e. the value of
|
||||
* its `xmlns` attribute or its inferred namespace.
|
||||
*
|
||||
* @return {Element}
|
||||
/**
|
||||
* Create an element, optionally with a known namespace URI.
|
||||
*
|
||||
* @param {string} name the element name, e.g. 'div' or 'svg'
|
||||
* @param {string} [namespaceURI] the element's namespace URI, i.e. the value of
|
||||
* its `xmlns` attribute or its inferred namespace.
|
||||
*
|
||||
* @return {Element}
|
||||
*/
|
||||
function createElementNS(name, namespaceURI) {
|
||||
return !namespaceURI || namespaceURI === NS_XHTML ? doc.createElement(name) : doc.createElementNS(namespaceURI, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the children of one DOM element to another DOM element
|
||||
/**
|
||||
* Copies the children of one DOM element to another DOM element
|
||||
*/
|
||||
function moveChildren(fromEl, toEl) {
|
||||
var curChild = fromEl.firstChild;
|
||||
|
@ -2067,18 +2067,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
var specialElHandlers = {
|
||||
/**
|
||||
* Needed for IE. Apparently IE doesn't think that "selected" is an
|
||||
* attribute when reading over the attributes using selectEl.attributes
|
||||
/**
|
||||
* Needed for IE. Apparently IE doesn't think that "selected" is an
|
||||
* attribute when reading over the attributes using selectEl.attributes
|
||||
*/
|
||||
OPTION: function OPTION(fromEl, toEl) {
|
||||
syncBooleanAttrProp(fromEl, toEl, 'selected');
|
||||
},
|
||||
/**
|
||||
* The "value" attribute is special for the <input> element since it sets
|
||||
* the initial value. Changing the "value" attribute without changing the
|
||||
* "value" property will have no effect since it is only used to the set the
|
||||
* initial value. Similar for the "checked" attribute, and "disabled".
|
||||
/**
|
||||
* The "value" attribute is special for the <input> element since it sets
|
||||
* the initial value. Changing the "value" attribute without changing the
|
||||
* "value" property will have no effect since it is only used to the set the
|
||||
* initial value. Similar for the "checked" attribute, and "disabled".
|
||||
*/
|
||||
INPUT: function INPUT(fromEl, toEl) {
|
||||
syncBooleanAttrProp(fromEl, toEl, 'checked');
|
||||
|
@ -2206,13 +2206,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a DOM node out of the original DOM
|
||||
*
|
||||
* @param {Node} node The node to remove
|
||||
* @param {Node} parentNode The nodes parent
|
||||
* @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.
|
||||
* @return {undefined}
|
||||
/**
|
||||
* Removes a DOM node out of the original DOM
|
||||
*
|
||||
* @param {Node} node The node to remove
|
||||
* @param {Node} parentNode The nodes parent
|
||||
* @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.
|
||||
* @return {undefined}
|
||||
*/
|
||||
function removeNode(node, parentNode, skipKeyedNodes) {
|
||||
if (onBeforeNodeDiscarded(node) === false) {
|
||||
|
@ -2599,16 +2599,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
/*
|
||||
* html2json for omi
|
||||
* https://github.com/AlloyTeam/omi
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
* Original code by Jxck
|
||||
* https://github.com/Jxck/html2json
|
||||
/*
|
||||
* html2json for omi
|
||||
* https://github.com/AlloyTeam/omi
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
* Original code by Jxck
|
||||
* https://github.com/Jxck/html2json
|
||||
*/
|
||||
|
||||
// Regular Expressions for parsing tags and attributes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Omi v1.4.0 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* Omi v1.4.1 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* MIT Licensed.
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
|
@ -137,14 +137,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Shim for "fixing" IE's lack of support (IE < 9) for applying slice
|
||||
* on host objects like NamedNodeMap, NodeList, and HTMLCollection
|
||||
* (technically, since host objects have been implementation-dependent,
|
||||
* at least before ES6, IE hasn't needed to work this way).
|
||||
* Also works on strings, fixes IE < 9 to allow an explicit undefined
|
||||
* for the 2nd argument (as in Firefox), and prevents errors when
|
||||
* called on other DOM objects.
|
||||
/**
|
||||
* Shim for "fixing" IE's lack of support (IE < 9) for applying slice
|
||||
* on host objects like NamedNodeMap, NodeList, and HTMLCollection
|
||||
* (technically, since host objects have been implementation-dependent,
|
||||
* at least before ES6, IE hasn't needed to work this way).
|
||||
* Also works on strings, fixes IE < 9 to allow an explicit undefined
|
||||
* for the 2nd argument (as in Firefox), and prevents errors when
|
||||
* called on other DOM objects.
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
@ -1328,15 +1328,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if two node's names are the same.
|
||||
*
|
||||
* NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same
|
||||
* nodeName and different namespace URIs.
|
||||
*
|
||||
* @param {Element} a
|
||||
* @param {Element} b The target element
|
||||
* @return {boolean}
|
||||
/**
|
||||
* Returns true if two node's names are the same.
|
||||
*
|
||||
* NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same
|
||||
* nodeName and different namespace URIs.
|
||||
*
|
||||
* @param {Element} a
|
||||
* @param {Element} b The target element
|
||||
* @return {boolean}
|
||||
*/
|
||||
function compareNodeNames(fromEl, toEl) {
|
||||
var fromNodeName = fromEl.nodeName;
|
||||
|
@ -1357,21 +1357,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an element, optionally with a known namespace URI.
|
||||
*
|
||||
* @param {string} name the element name, e.g. 'div' or 'svg'
|
||||
* @param {string} [namespaceURI] the element's namespace URI, i.e. the value of
|
||||
* its `xmlns` attribute or its inferred namespace.
|
||||
*
|
||||
* @return {Element}
|
||||
/**
|
||||
* Create an element, optionally with a known namespace URI.
|
||||
*
|
||||
* @param {string} name the element name, e.g. 'div' or 'svg'
|
||||
* @param {string} [namespaceURI] the element's namespace URI, i.e. the value of
|
||||
* its `xmlns` attribute or its inferred namespace.
|
||||
*
|
||||
* @return {Element}
|
||||
*/
|
||||
function createElementNS(name, namespaceURI) {
|
||||
return !namespaceURI || namespaceURI === NS_XHTML ? doc.createElement(name) : doc.createElementNS(namespaceURI, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the children of one DOM element to another DOM element
|
||||
/**
|
||||
* Copies the children of one DOM element to another DOM element
|
||||
*/
|
||||
function moveChildren(fromEl, toEl) {
|
||||
var curChild = fromEl.firstChild;
|
||||
|
@ -1451,18 +1451,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
var specialElHandlers = {
|
||||
/**
|
||||
* Needed for IE. Apparently IE doesn't think that "selected" is an
|
||||
* attribute when reading over the attributes using selectEl.attributes
|
||||
/**
|
||||
* Needed for IE. Apparently IE doesn't think that "selected" is an
|
||||
* attribute when reading over the attributes using selectEl.attributes
|
||||
*/
|
||||
OPTION: function OPTION(fromEl, toEl) {
|
||||
syncBooleanAttrProp(fromEl, toEl, 'selected');
|
||||
},
|
||||
/**
|
||||
* The "value" attribute is special for the <input> element since it sets
|
||||
* the initial value. Changing the "value" attribute without changing the
|
||||
* "value" property will have no effect since it is only used to the set the
|
||||
* initial value. Similar for the "checked" attribute, and "disabled".
|
||||
/**
|
||||
* The "value" attribute is special for the <input> element since it sets
|
||||
* the initial value. Changing the "value" attribute without changing the
|
||||
* "value" property will have no effect since it is only used to the set the
|
||||
* initial value. Similar for the "checked" attribute, and "disabled".
|
||||
*/
|
||||
INPUT: function INPUT(fromEl, toEl) {
|
||||
syncBooleanAttrProp(fromEl, toEl, 'checked');
|
||||
|
@ -1590,13 +1590,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a DOM node out of the original DOM
|
||||
*
|
||||
* @param {Node} node The node to remove
|
||||
* @param {Node} parentNode The nodes parent
|
||||
* @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.
|
||||
* @return {undefined}
|
||||
/**
|
||||
* Removes a DOM node out of the original DOM
|
||||
*
|
||||
* @param {Node} node The node to remove
|
||||
* @param {Node} parentNode The nodes parent
|
||||
* @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.
|
||||
* @return {undefined}
|
||||
*/
|
||||
function removeNode(node, parentNode, skipKeyedNodes) {
|
||||
if (onBeforeNodeDiscarded(node) === false) {
|
||||
|
@ -1983,16 +1983,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
/*
|
||||
* html2json for omi
|
||||
* https://github.com/AlloyTeam/omi
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
* Original code by Jxck
|
||||
* https://github.com/Jxck/html2json
|
||||
/*
|
||||
* html2json for omi
|
||||
* https://github.com/AlloyTeam/omi
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
* Original code by Jxck
|
||||
* https://github.com/Jxck/html2json
|
||||
*/
|
||||
|
||||
// Regular Expressions for parsing tags and attributes
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Omi v1.4.0 By dntzhang
|
||||
* Omi v1.4.1 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Omi v1.4.0 By dntzhang
|
||||
* Omi v1.4.1 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Omi v1.4.0 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* Omi v1.4.1 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* MIT Licensed.
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
|
@ -138,14 +138,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Shim for "fixing" IE's lack of support (IE < 9) for applying slice
|
||||
* on host objects like NamedNodeMap, NodeList, and HTMLCollection
|
||||
* (technically, since host objects have been implementation-dependent,
|
||||
* at least before ES6, IE hasn't needed to work this way).
|
||||
* Also works on strings, fixes IE < 9 to allow an explicit undefined
|
||||
* for the 2nd argument (as in Firefox), and prevents errors when
|
||||
* called on other DOM objects.
|
||||
/**
|
||||
* Shim for "fixing" IE's lack of support (IE < 9) for applying slice
|
||||
* on host objects like NamedNodeMap, NodeList, and HTMLCollection
|
||||
* (technically, since host objects have been implementation-dependent,
|
||||
* at least before ES6, IE hasn't needed to work this way).
|
||||
* Also works on strings, fixes IE < 9 to allow an explicit undefined
|
||||
* for the 2nd argument (as in Firefox), and prevents errors when
|
||||
* called on other DOM objects.
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
@ -1329,15 +1329,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if two node's names are the same.
|
||||
*
|
||||
* NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same
|
||||
* nodeName and different namespace URIs.
|
||||
*
|
||||
* @param {Element} a
|
||||
* @param {Element} b The target element
|
||||
* @return {boolean}
|
||||
/**
|
||||
* Returns true if two node's names are the same.
|
||||
*
|
||||
* NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same
|
||||
* nodeName and different namespace URIs.
|
||||
*
|
||||
* @param {Element} a
|
||||
* @param {Element} b The target element
|
||||
* @return {boolean}
|
||||
*/
|
||||
function compareNodeNames(fromEl, toEl) {
|
||||
var fromNodeName = fromEl.nodeName;
|
||||
|
@ -1358,21 +1358,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an element, optionally with a known namespace URI.
|
||||
*
|
||||
* @param {string} name the element name, e.g. 'div' or 'svg'
|
||||
* @param {string} [namespaceURI] the element's namespace URI, i.e. the value of
|
||||
* its `xmlns` attribute or its inferred namespace.
|
||||
*
|
||||
* @return {Element}
|
||||
/**
|
||||
* Create an element, optionally with a known namespace URI.
|
||||
*
|
||||
* @param {string} name the element name, e.g. 'div' or 'svg'
|
||||
* @param {string} [namespaceURI] the element's namespace URI, i.e. the value of
|
||||
* its `xmlns` attribute or its inferred namespace.
|
||||
*
|
||||
* @return {Element}
|
||||
*/
|
||||
function createElementNS(name, namespaceURI) {
|
||||
return !namespaceURI || namespaceURI === NS_XHTML ? doc.createElement(name) : doc.createElementNS(namespaceURI, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies the children of one DOM element to another DOM element
|
||||
/**
|
||||
* Copies the children of one DOM element to another DOM element
|
||||
*/
|
||||
function moveChildren(fromEl, toEl) {
|
||||
var curChild = fromEl.firstChild;
|
||||
|
@ -1452,18 +1452,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
|
||||
var specialElHandlers = {
|
||||
/**
|
||||
* Needed for IE. Apparently IE doesn't think that "selected" is an
|
||||
* attribute when reading over the attributes using selectEl.attributes
|
||||
/**
|
||||
* Needed for IE. Apparently IE doesn't think that "selected" is an
|
||||
* attribute when reading over the attributes using selectEl.attributes
|
||||
*/
|
||||
OPTION: function OPTION(fromEl, toEl) {
|
||||
syncBooleanAttrProp(fromEl, toEl, 'selected');
|
||||
},
|
||||
/**
|
||||
* The "value" attribute is special for the <input> element since it sets
|
||||
* the initial value. Changing the "value" attribute without changing the
|
||||
* "value" property will have no effect since it is only used to the set the
|
||||
* initial value. Similar for the "checked" attribute, and "disabled".
|
||||
/**
|
||||
* The "value" attribute is special for the <input> element since it sets
|
||||
* the initial value. Changing the "value" attribute without changing the
|
||||
* "value" property will have no effect since it is only used to the set the
|
||||
* initial value. Similar for the "checked" attribute, and "disabled".
|
||||
*/
|
||||
INPUT: function INPUT(fromEl, toEl) {
|
||||
syncBooleanAttrProp(fromEl, toEl, 'checked');
|
||||
|
@ -1591,13 +1591,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a DOM node out of the original DOM
|
||||
*
|
||||
* @param {Node} node The node to remove
|
||||
* @param {Node} parentNode The nodes parent
|
||||
* @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.
|
||||
* @return {undefined}
|
||||
/**
|
||||
* Removes a DOM node out of the original DOM
|
||||
*
|
||||
* @param {Node} node The node to remove
|
||||
* @param {Node} parentNode The nodes parent
|
||||
* @param {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.
|
||||
* @return {undefined}
|
||||
*/
|
||||
function removeNode(node, parentNode, skipKeyedNodes) {
|
||||
if (onBeforeNodeDiscarded(node) === false) {
|
||||
|
@ -1984,16 +1984,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
/*
|
||||
* html2json for omi
|
||||
* https://github.com/AlloyTeam/omi
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
* Original code by Jxck
|
||||
* https://github.com/Jxck/html2json
|
||||
/*
|
||||
* html2json for omi
|
||||
* https://github.com/AlloyTeam/omi
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
* Original code by Jxck
|
||||
* https://github.com/Jxck/html2json
|
||||
*/
|
||||
|
||||
// Regular Expressions for parsing tags and attributes
|
||||
|
@ -2976,16 +2976,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
/* 10 */
|
||||
/***/ function(module, exports) {
|
||||
|
||||
module.exports = function(module) {
|
||||
if(!module.webpackPolyfill) {
|
||||
module.deprecate = function() {};
|
||||
module.paths = [];
|
||||
// module.parent = undefined by default
|
||||
module.children = [];
|
||||
module.webpackPolyfill = 1;
|
||||
}
|
||||
return module;
|
||||
}
|
||||
module.exports = function(module) {
|
||||
if(!module.webpackPolyfill) {
|
||||
module.deprecate = function() {};
|
||||
module.paths = [];
|
||||
// module.parent = undefined by default
|
||||
module.children = [];
|
||||
module.webpackPolyfill = 1;
|
||||
}
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
/***/ }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Omi v1.4.0 By dntzhang
|
||||
* Omi v1.4.1 By dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "omi",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Open and modern framework for building user interfaces.",
|
||||
"main": "dist/omi.js",
|
||||
"types": "index.d.ts",
|
||||
|
|
Loading…
Reference in New Issue