Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOM Reference] Update CustomEvent interface reference #9920

Merged
merged 13 commits into from
Nov 22, 2021

Conversation

teoli2003
Copy link
Contributor

This is part of #9740.

  • All properties and methods of CustomEventare documented in the modern format.
  • All are listed in the interface.
  • I removed a polyfill for pre-IE9 browsers
  • I removed some information about the security risks of using this in privileged code.

@teoli2003 teoli2003 requested a review from a team as a code owner October 19, 2021 09:11
@teoli2003 teoli2003 requested review from jpmedley and removed request for a team October 19, 2021 09:11
@github-actions github-actions bot added the Content:WebAPI Web API docs label Oct 19, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2021

files/en-us/web/api/customevent/customevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/customevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/customevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/detail/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/initcustomevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/initcustomevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/initcustomevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/initcustomevent/index.md Outdated Show resolved Hide resolved
teoli2003 and others added 8 commits October 20, 2021 07:35
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
Co-authored-by: Joe Medley <jmedley@google.com>
@teoli2003
Copy link
Contributor Author

Thanks a lot, @jpmedley! This is very helpful.

@teoli2003 teoli2003 changed the title Update CustomEvent interface reference [DOM Reference] Update CustomEvent interface reference Oct 20, 2021
files/en-us/web/api/customevent/customevent/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/customevent/detail/index.md Outdated Show resolved Hide resolved
@@ -55,5 +50,4 @@ event.initCustomEvent(type, canBubble, cancelable, detail);
## See also

- {{domxref("CustomEvent")}}
- The constructor to use instead of this deprecated method:
{{domxref("CustomEvent.CustomEvent", "CustomEvent()")}}.
- The constructor to use instead of this deprecated method: {{domxref("CustomEvent.CustomEvent", "CustomEvent()")}}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important enough that it should be at the top, not in what many may view as extra information.

(Has anyone discussed whether deprecated features should have a heading titled "Alternatives"?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already mentioned in the first section, at the top of the article, in the note:
Screenshot 2021-10-27 at 07 14 30

I think it does no harm to have it at both places, and I 100% agree it has to be mentioned at the top.

For an Alternatives, it is worth discussing. I don't know if we want a heading or a note, but we definitively need the information about the alternative (and near the top of the article) each time something is deprecated or non-standard, or people will continue to use it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does no harm to have it at both places

One such item does no harm. I do my best to minimize such repetitions. They are too easily missed during update passes.

Co-authored-by: Joe Medley <jmedley@google.com>
teoli2003 and others added 2 commits October 27, 2021 07:09
Co-authored-by: Joe Medley <jmedley@google.com>
@Elchi3 Elchi3 merged commit b7c4297 into mdn:main Nov 22, 2021
@joshuakimrub
Copy link

Hello,
a few weeks ago I was doing some research on possible security issues in CustomEvents when I came across the "Firing from privileged code to non-privileged code" in your documentation. Now I am wondering why it has been removed in this commit. Has this security risk been resolved or just moved to another page and I just overlooked it?
Best regards,
Joshua

@Elchi3
Copy link
Member

Elchi3 commented Dec 7, 2021

It was removed because the section talked about Firefox XUL/XPCOM extension code. We are trying to make MDN Web Docs only about Web technologies. XUL/XPCOM Firefox extensions don't exist anymore so it was removed for that reason. "privileged" referred to privileged code in an extension context.
I hope this clears it up?

@joshuakimrub
Copy link

Yes, thank you very much!

@alattalatta alattalatta mentioned this pull request Dec 9, 2021
3 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants