Re: [WICG/webcomponents] Reference Target: what type should the `referenceTarget` attribute be? (Issue #1093)

I left out an important part of (1); I should have made a table:

| Option | Type | `""` is | `null` is |
| - | - | - | - |
| 1 | `DOMString?` | equivalent to invalid ID | equivalent to un-set |
| 2 | `DOMString` | equivalent to un-set | converted to `"null"`, likely invalid |
| 3 | `DOMString` | equivalent to invalid ID | converted to `"null"`, likely invalid |

So, to answer @Westbrook's questions:
  
> * In no. 1, how would setting to `""` be different than setting to `null`?

`""` is not a valid ID, so it's treated the same as any other invalid ID value.

> * In no. 2, what would setting to `null` do?

It's converted to a string, `"null"`.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1093#issuecomment-2623352225
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1093/2623352225@github.com>

Received on Thursday, 30 January 2025 02:00:42 UTC