Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 037f121

Browse filesBrowse files
committed
update: target prop should accept an HTMLElement
1 parent 1eb90ee commit 037f121
Copy full SHA for 037f121

File tree

Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-9
lines changed

‎active-rfcs/0000-portals.md

Copy file name to clipboardExpand all lines: active-rfcs/0000-portals.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,20 @@ const App = {
139139

140140
## The `target` prop
141141

142-
The component has only one _required_ prop, named `target`. It accepts a string wich has to be a valid query selector.
142+
The component has only one _required_ prop, named `target`. It accepts a string wich has to be a valid query selector, or an HTMLElement (if used in a browser environment).
143143

144144
```html
145145
<!-- ok -->
146-
<Portal target="#some-id">
147-
<Portal target=".some-class">
148-
<Portal target="[data-portal]">
149-
<!--
150-
probably too unspecific, but technically valid
146+
<Portal target="#some-id" />
147+
<Portal target=".some-class" />
148+
<Portal target="[data-portal]" />
149+
<!--
150+
probably too unspecific, but technically valid
151151
should we allow this or block it?
152152
-->
153-
<Portal target="h1">
154-
<!-- Wrong -->
155-
<Portal target="some-string"></Portal></Portal></Portal></Portal
153+
<Portal target="h1" />
154+
<!-- Wrong -->
155+
<Portal target="some-string" />
156156
></Portal>
157157
```
158158

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.