IOS Safari是否支持Shadow DOM? [英] Does IOS Safari support Shadow DOM?

查看:163
本文介绍了IOS Safari是否支持Shadow DOM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序能够渲染Shadow DOM,但是检查器无法显示shadow根.有人可以帮我吗?

My application is able to render the Shadow DOM, but the inspector cannot display the shadow root. Can anyone help me out on this?

推荐答案

这取决于您指的是哪个Shadow DOM,即Shadow DOM v0或Shadow DOM v1.

It depends on which Shadow DOM you mean—Shadow DOM v0 or Shadow DOM v1.

请参见 http://caniuse.com/#feat=shadowdomv1 没有任何版本的Safari支持Shadow DOM v0.但是就iOS Safari而言,版本10.2+支持Shadow DOM v1,但有以下限制:

No version of Safari supports Shadow DOM v0. But as far as iOS Safari, version 10.2+ support Shadow DOM v1 with the following limitation:

某些CSS选择器不起作用(:host > .local-child),并且样式设置的内容(::slotted)有问题.

Certain CSS selectors do not work (:host > .local-child) and styling slotted content (::slotted) is buggy.

关于Shadow DOM v0和v1之间的区别,请参见 https://hayato.io/2016/shadowdomv1 /

As far as differences between Shadow DOM v0 and v1, see https://hayato.io/2016/shadowdomv1/

关于如何在WebKit/Safari检查器中查看阴影根,您需要单击一个按钮以显示阴影根;看起来像这样:

About how to see the shadow root in the WebKit/Safari Inspector, there’s a button you need to click to show shadow roots; it looks like this:

在Inspector用户界面中,它位于选项卡右下方的工具栏中.激活后变为蓝色:

And in the Inspector UI, it’s in the toolbar on the right below the tabs. It turns blue when activated:

这篇关于IOS Safari是否支持Shadow DOM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆