React: "webkit-playsinline" attribute in JSX is not supported

Created on 21 Aug 2015  ·  15Comments  ·  Source: facebook/react

Hi, the 'webkit-playsinline' in JSX will be ignored. Is there any solution to solve this problem?

<video webkit-playsinline controls src='foo' poster='bar' style={ videoStyle }></video>
DOM

Most helpful comment

v15.3.0 supports playsInline 😄

All 15 comments

It's because webkit-playsinline is a non-standard attribute in React, view code

https://github.com/facebook/react/issues/140 might help

At last I use pure DOM to add this attribute. JSX suck, hah.

这个锅应该 React 背,JSX 是转换了这个 attr 的。

I should say Virtual DOM suck

@djyde 刚被公司聊天室链接到这条issue上。太不礼貌了。非要吐槽请至少用中文,别给中国人丢脸。

@cheapsteak 我觉得要吐槽 Virtual Dom 什么理由都可以,只要是当事者觉得不爽的,要不然拿 issue 来干毛?和礼不礼貌没半毛钱关系,更别提给中国人丢脸。

suck 可以指 somewhere suck,难道 Virtual Dom 是完美的存在,不能 suck 一下?

况且,我觉得你的后半句更值得商榷哦。(QQ空间体?

// maintainers please ignore this comment.

I may have misunderstood what 吐槽 means.
By all means open issues and complain about bugs and other imperfections, but that can be done without being flippant and rude.

It's possible that he didn't mean for it to come off that way, but that would be a great reason to only 用中文吐槽; 能为自己言语不敬的程度负责

Replying to @egoist and @djyde below:

@egoist 你的comment为啥没发到我个人页面的那个邮箱而发这污染issue?有些hypocritical不是吗?

@djyde 如果光是 asking for a solution我会说你吗?

@cheapsteak 请不要继续污染这个 issue,如有需要请打开我的个人页面那有邮箱。

// maintainers please ignore this comment.

@cheapsteak I opened this issue for asking an solution. Not for complaining.

v15.3.0 supports playsInline 😄

I am on 15.3.2 and still get this error:

ERROR in [default] Property 'playsInline' does not exist on type 'HTMLProps<HTMLVideoElement>'.

@marktani looks like an error with your type system, not React. If you're using flow, then it looks like the included DOM lib doesn't have playsInline on HTMLVideoElement

I use TypeScript. In my case I don't really need playsInline, was just curious. thanks for the clarification!

能不能自定义哪些属性不被忽略?

diu bu diu ren?

Was this page helpful?
0 / 5 - 0 ratings