D13378: Handle when the added node itself is audio/video

Fabian Vogt noreply at phabricator.kde.org
Wed Jun 6 10:02:18 UTC 2018


fvogt requested changes to this revision.
fvogt added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> content-script.js:356
> +                // first check whether the node itself is audio/video
> +                var tagName = node.tagName;
> +                if (typeof tagName === "string") {

Use `node.matches("video,audio")` instead?

> content-script.js:365
> +                // then check whether any of its children are
>                  if (typeof node.querySelectorAll !== "function") {
>                      return;

Skip the children check if it's a video/audio element.

REPOSITORY
  R856 Plasma Browser Integration

REVISION DETAIL
  https://phabricator.kde.org/D13378

To: broulik, #plasma, fvogt, davidedmundson
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180606/778c1f65/attachment-0001.html>


More information about the Plasma-devel mailing list