| ▲ | croes 11 hours ago |
| If I need the old functionality why not stick to innerHTML? |
|
| ▲ | orf 11 hours ago | parent | next [-] |
| because the "unsafe" suffix conveys information to the reader, whereas `innherHTML` does not? |
| |
| ▲ | goatlover 10 hours ago | parent [-] | | Any potential reader should be familiar with innerHTML. | | |
| ▲ | kennywinker 9 hours ago | parent | next [-] | | Right. Like how any potential reader is familiar with the risks of sql injection which is why nothing has ever been hacked that way. Or how any potential driver is familiar with seat belts which is why everybody wears them and nobody’s been thrown from a car since they were invented. | | | |
| ▲ | orf 9 hours ago | parent | prev [-] | | yes, and bugs shouldn't exist because everyone should be familiar with everything. | | |
| ▲ | croes 8 hours ago | parent [-] | | But if some are marked unsafe and others are not it gives a false sense of security if something is not marked unsafe. | | |
| ▲ | orf 8 hours ago | parent [-] | | So we shouldn’t mark anything as unsafe then? And give no indication whatsoever? The issue isn’t that the word “safe” doesn’t appear in safe variants, it’s that “unsafe” makes your intentions clear: “I know this is unsafe, but it’s fine because of X and Y”. | | |
| ▲ | croes 7 hours ago | parent [-] | | Maybe we should add the word safe and consider everything else as unsafe | | |
| ▲ | orf 7 hours ago | parent [-] | | Like life, things should default to being safe. Unsafe, unexpected behaviours should be exception and thus require an exceptional name. Legacy and backwards compatibility hampers this, but going forward… |
|
|
|
|
|
|
|
| ▲ | tbrownaw 11 hours ago | parent | prev | next [-] |
| Because then your linter won't be able to tell you when you're done migrating the calls that can be migrated. |
|
| ▲ | philipwhiuk 9 hours ago | parent | prev [-] |
| Because sooner or later it'll be removed. |
| |
| ▲ | goatlover 8 hours ago | parent | next [-] | | No because the web has to remain backwards compatible with older sites. This has always been the case. | |
| ▲ | croes 8 hours ago | parent | prev [-] | | And break millions of sites? |
|