Skip to content

Commit e22a9ad

Browse files
committed
simplify per CR feedback
1 parent b581c15 commit e22a9ad

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

examples/realitytabs.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,11 @@
592592
}
593593
}
594594

595-
const _drawOk = (src) => {
596-
console.log('reality tab load ok: ' + src);
595+
const _drawOk = () => {
596+
console.log('reality tab load ok: ' + u);
597597
};
598-
const _drawFail = (src) => {
599-
console.log('reality tab load error: ' + src);
598+
const _drawFail = () => {
599+
console.log('reality tab load error: ' + u);
600600
};
601601

602602
const iframe = document.createElement('iframe');
@@ -617,11 +617,11 @@
617617
}
618618
})();
619619
if (contentDocument) {
620-
_drawOk(iframe.src);
620+
_drawOk();
621621

622622
// scene.background = null;
623623
} else {
624-
_drawFail(iframe.src || u);
624+
_drawFail();
625625

626626
_closeTab(tab);
627627

src/DOM.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Node.DOCUMENT_TYPE_NODE = 10;
309309
Node.DOCUMENT_FRAGMENT_NODE = 11;
310310
module.exports.Node = Node;
311311

312-
const _setAttributeRaw = (el, prop, value, notify = true) => {
312+
const _setAttributeRaw = (el, prop, value) => {
313313
if (prop === 'length') {
314314
el.attrs.length = value;
315315
} else {
@@ -320,11 +320,11 @@ const _setAttributeRaw = (el, prop, value, notify = true) => {
320320
value,
321321
};
322322
el.attrs.push(attr);
323-
notify && el._emit('attribute', prop, value, null);
323+
el._emit('attribute', prop, value, null);
324324
} else {
325325
const oldValue = attr.value;
326326
attr.value = value;
327-
notify && el._emit('attribute', prop, value, oldValue);
327+
el._emit('attribute', prop, value, oldValue);
328328
}
329329
}
330330
};
@@ -2200,8 +2200,6 @@ class HTMLIFrameElement extends HTMLSrcableElement {
22002200
const options = parentWindow[symbols.optionsSymbol];
22012201

22022202
url = _normalizeUrl(res.url, options.baseUrl);
2203-
// passively update .src with the final url (which can differ in case of redirects)
2204-
_setAttributeRaw(this, 'src', url, false);
22052203
const parent = {};
22062204
const top = parentWindow === parentWindow.top ? parent : {};
22072205
this.contentWindow = _makeWindow({

0 commit comments

Comments
 (0)