* [Edbrowse-dev] document.head.querySelector
@ 2017-12-10 10:02 Kevin Carhart
2017-12-10 15:08 ` Karl Dahlke
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Carhart @ 2017-12-10 10:02 UTC (permalink / raw)
To: edbrowse-dev
Sorry to write about multiple things concurrently, but I also hit this in
the xqsuperschool code. Interesting.. it's expecting document.head.querySelector so
that it can query for metas by selector syntax. I don't know why it needs
to be called on document.head, when metas by definition will only
be in head.
getConfig: function(name) {
var element;
element = document.head.querySelector("meta[name='action-cable-" + name + "']");
return element != null ? element.getAttribute("content") : void 0;
},
I have been banging my brains on it for a while. Is there a proper place
to add functions to document.head? I tried adding it at the very bottom, after
document.querySelector, and it wasn't recognizing document.head unless I
am misinterpreting messages.
Does this need to take place after third.js has run? No.. it doesn't,
right? Otherwise you wouldn't be able to define document.querySelector
either.
thanks
Kevin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Edbrowse-dev] document.head.querySelector
2017-12-10 10:02 [Edbrowse-dev] document.head.querySelector Kevin Carhart
@ 2017-12-10 15:08 ` Karl Dahlke
2017-12-11 9:27 ` Kevin Carhart
0 siblings, 1 reply; 5+ messages in thread
From: Karl Dahlke @ 2017-12-10 15:08 UTC (permalink / raw)
To: edbrowse-dev
Well it's true that document.head doesn't exist when startwindow runs, but Head does, so how bout
Head.prototype.querySelector = function(x) { return querySelectorAll(x)[0] }
Would something like that work?
Karl Dahlke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Edbrowse-dev] document.head.querySelector
2017-12-10 15:08 ` Karl Dahlke
@ 2017-12-11 9:27 ` Kevin Carhart
[not found] ` <20171111101510.eklhad@comcast.net>
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Carhart @ 2017-12-11 9:27 UTC (permalink / raw)
To: edbrowse-dev
Thank you, Karl. That worked great and it retrieved the meta it is trying
to retrieve. I have some bits and pieces I need to submit. But here are
a couple more questions:
- For the anchor element type, I think it needs a couple of the
properties that we make use of on the URL class. Would it be ok to add a couple of
these things to case "a" like
case "a":
c = new Anchor();
c.protocol = "";
c.pathname = "";
break;
- xq wants document.createElementNS. Does this ring a bell? Maybe this
would just be a wrapper to createElement which supplies the string
"http://www.w3.org/1999/xhtml"
Is namespaces a real issue or just a nominal, placeholder issue? It seems
to me that it is just a nominal issue because MDN gives four valid
namespace URIs, only one of which we would care about. They are for HTML,
SVG, XBL and XUL. Who cares about the latter three? We don't support
them, so I don't think we would hit name collisions between them.
- I think there is something going on with cloneNode and whether cloneNode
clones event handler code. So that's an interesting problem. Why now..
why not before now... I think maybe it's tested for in some versions of a
library, like jquery, and maybe it wasn't previously.
thanks
Kevin
On Sun, 10 Dec 2017, Karl Dahlke wrote:
> Well it's true that document.head doesn't exist when startwindow runs, but Head does, so how bout
>
> Head.prototype.querySelector = function(x) { return querySelectorAll(x)[0] }
>
> Would something like that work?
>
> Karl Dahlke
> _______________________________________________
> Edbrowse-dev mailing list
> Edbrowse-dev@lists.the-brannons.com
> http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev
>
--------
Kevin Carhart * 415 225 5306 * The Ten Ninety Nihilists
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-22 2:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-10 10:02 [Edbrowse-dev] document.head.querySelector Kevin Carhart
2017-12-10 15:08 ` Karl Dahlke
2017-12-11 9:27 ` Kevin Carhart
[not found] ` <20171111101510.eklhad@comcast.net>
2017-12-22 2:23 ` Kevin Carhart
2017-12-22 2:58 ` Karl Dahlke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).