.wc-item-meta>li p{
display: inline;
}
path = "['fields']['components']['name']"
json = {'fields': {'components': {'id': '10437', 'name': 'Bug'}}}
print (eval('json' + path + ''))
<div id="div1">div1</div>
<script>
// BEFORE ANY CODE
const div1 = document.querySelector("#div1");
const realAddEventListener = div1.addEventListener.bind(div1);
const realRemoveEventListener = div1.removeEventListener.bind(div1);
const events = [];
div1.addEventListener = (name, listener, opts) => {
events.push({ name, listener, opts });
return realAddEventListener(name, listener, opts);
};
div1.removeEventListener = (name, listener, opts) => {
events = events.filter((e) => (e.name === name && e.listener === listener));
realRemoveEventListener(name, listener, opts);
};
// CODE
div1.addEventListener("click", () => alert("click"), false);
// CLONE
const div2 = div1.cloneNode();
div2.innerHTML = "div2";
events.map((e) => div2.addEventListener(e.name, e.listener, e.opts));
document.querySelector("body").appendChild(div2);
</script>
file.onload = ()=>{ // после загрузки файла
parent.fileReady(); // вызываем функцию у родительского окна
};
/**
* Determine the mobile operating system.
* This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
*
* @returns {String}
*/
function getMobileOperatingSystem() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
// Windows Phone must come first because its UA also contains "Android"
if (/windows phone/i.test(userAgent)) {
return "Windows Phone";
}
if (/android/i.test(userAgent)) {
return "Android";
}
// iOS detection from: http://stackoverflow.com/a/9039885/177710
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "iOS";
}
return "unknown";
}
react-native log-android.
$dom = new DOMDocument;
$dom->loadHTML($html);
$images = $dom->getElementsByTagName('img');
foreach ($images as $image) {
$image->setAttribute('src', 'http://example.com/' . $image->getAttribute('src'));
}
$html = $dom->saveHTML();