edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] document.head.querySelector
Date: Sun, 10 Dec 2017 02:02:25 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1712100154030.16570@carhart.net> (raw)



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


             reply	other threads:[~2017-12-10 10:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-10 10:02 Kevin Carhart [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1712100154030.16570@carhart.net \
    --to=kevin@carhart.net \
    --cc=edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).