(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("fastdom")); else if(typeof define === 'function' && define.amd) define(["fastdom"], factory); else if(typeof exports === 'object') exports["fastdom"] = factory(require("fastdom")); else root["fastdom"] = factory(root["fastdom"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var strictdom = __webpack_require__(1); var fastdom = __webpack_require__(2); /** * Mini logger * * @return {Function} */ var debug = 0 ? console.log.bind(console, '[fastdom-strict]') : function() {}; /** * Enabled state * * @type {Boolean} */ var enabled = false; window.fastdom = module.exports = fastdom.extend({ measure: function(task, ctx) { debug('measure'); return this.fastdom.measure(function() { if (!enabled) return task(); return strictdom.phase('measure', task); }, ctx); }, mutate: function(task, ctx) { debug('mutate'); return this.fastdom.mutate(function() { if (!enabled) return task(); return strictdom.phase('mutate', task); }, ctx); }, strict: function(value) { if (value) { enabled = true; strictdom.enable(); } else { enabled = false; strictdom.disable(); } } }); // turn on strict-mode window.fastdom.strict(true); /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;!(function() { 'use strict'; var debug = 0 ? console.log.bind(console, '[strictdom]') : function() {}; /** * Crude webkit test. * * @type {Boolean} */ // var isWebkit = !!window.webkitURL; /** * List of properties observed. * * @type {Object} */ var properties = { prototype: { Document: { execCommand: Mutate, elementFromPoint: Measure, elementsFromPoint: Measure, scrollingElement: Measure }, Node: { appendChild: { type: Mutate, test: function(dom, parent, args) { var attached = isAttached(parent) || isAttached(args[0]); if (attached && dom.not('mutate')) throw error(3, this.name); } }, insertBefore: { type: Mutate, test: function(dom, parent, args) { var attached = isAttached(parent) || isAttached(args[0]); if (attached && dom.not('mutate')) throw error(3, this.name); } }, removeChild: { type: Mutate, test: function(dom, parent, args) { var attached = isAttached(parent) || isAttached(args[0]); if (attached && dom.not('mutate')) throw error(3, this.name); } }, textContent: Mutate }, Element: { scrollIntoView: Mutate, scrollBy: Mutate, scrollTo: Mutate, getClientRects: Measure, getBoundingClientRect: Measure, clientLeft: Measure, clientWidth: Measure, clientHeight: Measure, scrollLeft: Accessor, scrollTop: Accessor, scrollWidth: Measure, scrollHeight: Measure, innerHTML: Mutate, outerHTML: Mutate, insertAdjacentHTML: Mutate, remove: Mutate, setAttribute: Mutate, removeAttribute: Mutate, className: Mutate, classList: ClassList }, HTMLElement: { offsetLeft: Measure, offsetTop: Measure, offsetWidth: Measure, offsetHeight: Measure, offsetParent: Measure, innerText: Accessor, outerText: Accessor, focus: Measure, blur: Measure, style: Style, // `element.dataset` is hard to wrap. // We could use `Proxy` but it's not // supported in Chrome yet. Not too // concerned as `data-` attributes are // not often associated with render. // dataset: DATASET }, CharacterData: { remove: Mutate, data: Mutate }, Range: { getClientRects: Measure, getBoundingClientRect: Measure }, MouseEvent: { layerX: Measure, layerY: Measure, offsetX: Measure, offsetY: Measure }, HTMLButtonElement: { reportValidity: Measure }, HTMLDialogElement: { showModal: Mutate }, HTMLFieldSetElement: { reportValidity: Measure }, HTMLImageElement: { width: Accessor, height: Accessor, x: Measure, y: Measure }, HTMLInputElement: { reportValidity: Measure }, HTMLKeygenElement: { reportValidity: Measure }, SVGSVGElement: { currentScale: Accessor } }, instance: { window: { getComputedStyle: { type: Measure, /** * Throws when the Element is in attached * and strictdom is not in the 'measure' phase. * * @param {StrictDom} strictdom * @param {Window} win * @param {Object} args */ test: function(strictdom, win, args) { if (isAttached(args[0]) && strictdom.not('measure')) { throw error(2, 'getComputedStyle'); } } }, // innerWidth: { // type: isWebkit ? Value : Measure, // // /** // * Throws when the window is nested (in