Permalink
Please sign in to comment.
Showing
with
250 additions
and 217 deletions.
- +2 −1 LICENSE.txt
- +1 −1 bower.json
- +2 −2 build/document-register-element.amd.js
- +2 −2 build/document-register-element.js
- +17 −7 build/document-register-element.max.amd.js
- +17 −7 build/document-register-element.max.js
- +1 −1 build/dre-ie8-upfront-fix.js
- +2 −1 build/dre-ie8-upfront-fix.max.js
- +1 −1 build/innerHTML.js
- +2 −1 build/innerHTML.max.js
- +1 −1 package.json
- +15 −6 src/document-register-element.js
- +1 −1 template/copyright
- +186 −185 test/document-register-element.js
| @@ -1,2 +1,2 @@ | ||
| -/*! (C) WebReflection Mit Style License */ | ||
| +/*! (C) Andrea Giammarchi - @WebReflection - Mit Style License */ | ||
| (function(e,t,n){if(n in e)return;var r=0,i=e.clearTimeout,s=e.setTimeout,o=Element.prototype,u=t.getOwnPropertyDescriptor,a=t.defineProperty,f=function(){document.dispatchEvent(new CustomEvent("readystatechange"))},l=function(e,t){i(r),r=s(f,10)},c=function(e){var t=u(o,e),n={configurable:t.configurable,enumerable:t.enumerable,get:function(){return t.get.call(this)},set:function(r){delete o[e],this[e]=r,a(o,e,n),l(this)}};a(o,e,n)},h=function(e){var t=u(o,e),n=t.value;t.value=function(){var e=n.apply(this,arguments);return l(this),e},a(o,e,t)};c("innerHTML"),c("innerText"),c("outerHTML"),c("outerText"),c("textContent"),h("appendChild"),h("applyElement"),h("insertAdjacentElement"),h("insertAdjacentHTML"),h("insertAdjacentText"),h("insertBefore"),h("insertData"),h("replaceAdjacentText"),h("replaceChild"),h("removeChild"),e[n]=Element})(window,Object,"HTMLElement"); |
| @@ -1,3 +1,3 @@ | ||
| -/*! (C) WebReflection Mit Style License */ | ||
| +/*! (C) Andrea Giammarchi - @WebReflection - Mit Style License */ | ||
| // see https://github.com/WebReflection/document-register-element/issues/21#issuecomment-102020311 | ||
| var innerHTML=function(e){var t="extends",n=e.registerElement,r=e.createElement("div"),i="document-register-element",s=n.innerHTML,o,u;if(s)return s;try{n.call(e,i,{prototype:Object.create(HTMLElement.prototype,{createdCallback:{value:Object}})}),r.innerHTML="<"+i+"></"+i+">";if("createdCallback"in r.querySelector(i))return n.innerHTML=function(e,t){return e.innerHTML=t,e}}catch(a){}return u=[],o=function(t){if("createdCallback"in t||"attachedCallback"in t||"detachedCallback"in t||"attributeChangedCallback"in t)return;e.createElement.innerHTMLHelper=!0;for(var n=t.parentNode,r=t.getAttribute("is"),i=t.nodeName,s=e.createElement.apply(e,r?[i,r]:[i]),o=t.attributes,u=0,a=o.length,f,l;u<a;u++)f=o[u],s.setAttribute(f.name,f.value);s.createdCallback&&(s.created=!0,s.createdCallback(),s.created=!1);while(l=t.firstChild)s.appendChild(l);e.createElement.innerHTMLHelper=!1,n&&n.replaceChild(s,t)},(e.registerElement=function(i,s){var o=(s[t]?s[t]+'[is="'+i+'"]':i).toLowerCase();return u.indexOf(o)<0&&u.push(o),n.apply(e,arguments)}).innerHTML=function(e,t){e.innerHTML=t;for(var n=e.querySelectorAll(u.join(",")),r=n.length;r--;o(n[r]));return e}}(document); |
| @@ -1 +1 @@ | ||
| -/*! (C) WebReflection Mit Style License */ | ||
| +/*! (C) Andrea Giammarchi - @WebReflection - Mit Style License */ |
Oops, something went wrong.
0 comments on commit
0e98e64