Generate r#async method names in web-sys

This is a new keyword in the 2018 edition!
This commit is contained in:
Alex Crichton
2019-03-26 08:16:53 -07:00
parent a6fe0cefa8
commit 778e497186
2 changed files with 22 additions and 2 deletions

View File

@ -34,9 +34,9 @@ fn test_script_element() {
element.set_charset("UTF-8");
assert_eq!(element.charset(), "UTF-8", "Should have a charset");
assert!(element.async(), "Should be async");
assert!(element.r#async(), "Should be async");
element.set_async(false);
assert!(!element.async(), "Shouldn't be a async");
assert!(!element.r#async(), "Shouldn't be a async");
assert!(!element.defer(), "Shouldn't be a defer");
element.set_defer(true);