Note that there are some explanatory texts on larger screens.

plurals
  1. POIE 8 - Invalid source HTML for this operation
    primarykey
    data
    text
    <p>What is wrong with</p> <pre><code>el.insertAdjacentHTML(hashVal[0], html); </code></pre> <p>where html is <code>"&lt;a title=\"\"&gt;1&lt;/a&gt;"</code> and <code>hashVal[0]</code> is "afterBegin".</p> <p>This is related to a rating functionality. I think due to this error, the rating star is not displaying in ie 8. Other browsers are ok. I have given the full flow of code below. I am using extjs.</p> <pre><code> var starLink = star.createChild({ tag: 'a', html: this.values[i], title: this.showTitles ? this.titles[i] : '' }); </code></pre> <p>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p> <pre><code>createChild : function(config, insertBefore, returnDom) { config = config || {tag:'div'}; if (insertBefore) { return Ext.DomHelper.insertBefore(insertBefore, config, returnDom !== true); } else { return Ext.DomHelper[!this.dom.firstChild ? 'insertFirst' : 'append'](this.dom, config, returnDom !== true); } }, </code></pre> <p>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p> <pre><code>insertFirst : function(el, o, returnElement){ return doInsert(el, o, returnElement, afterbegin, 'firstChild'); }, </code></pre> <p>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p> <pre><code>function doInsert(el, o, returnElement, pos, sibling, append){ el = Ext.getDom(el); var newNode; if (pub.useDom) { newNode = createDom(o, null); if (append) { el.appendChild(newNode); } else { (sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el); } } else { newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o)); } return returnElement ? Ext.get(newNode, true) : newNode; } </code></pre> <p>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p> <pre><code>function createHtml(o){ var b = '', attr, val, key, cn, i; if(typeof o == "string"){ b = o; } else if (Ext.isArray(o)) { for (i=0; i &lt; o.length; i++) { if(o[i]) { b += createHtml(o[i]); } } } else { b += '&lt;' + (o.tag = o.tag || 'div'); for (attr in o) { val = o[attr]; if(!confRe.test(attr)){ if (typeof val == "object") { b += ' ' + attr + '="'; for (key in val) { b += key + ':' + val[key] + ';'; } b += '"'; }else{ b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '="' + val + '"'; } } } if (emptyTags.test(o.tag)) { b += '/&gt;'; } else { b += '&gt;'; if ((cn = o.children || o.cn)) { b += createHtml(cn); } else if(o.html){ b += o.html; } b += '&lt;/' + o.tag + '&gt;'; } } return b; } </code></pre> <p>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</p> <pre><code> insertHtml : function(where, el, html){ var hash = {}, hashVal, range, rangeEl, setStart, frag, rs; where = where.toLowerCase(); hash[beforebegin] = ['beforeBegin', 'previousSibling']; hash[afterend] = ['afterEnd', 'nextSibling']; if (el.insertAdjacentHTML) { if(tableRe.test(el.tagName) &amp;&amp; (rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html))){ return rs; } hash[afterbegin] = ['afterBegin', 'firstChild']; hash[beforeend] = ['beforeEnd', 'lastChild']; if ((hashVal = hash[where])) { el.insertAdjacentHTML(hashVal[0], html); return el[hashVal[1]]; } } else { </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload