Recommend me anything fitting the story of "I'm a loser, but fortunately the king is my bff"

2022.01.27 14:56 WetherNo Recommend me anything fitting the story of "I'm a loser, but fortunately the king is my bff"

That would go like this: king/leader is using power or position to shield a friend from suffering, hard life situation, help them out of trouble, that would normally be rather devastating. He may bend the rules or his own honor to do so. Might be dramatic or comedic, both are fine. Doesn't have to be a main plot and literal king, but you get an idea. I need this for an inspiration to write an essay.Thank you good people.
submitted by WetherNo to PeriodDramas [link] [comments]


2022.01.27 14:56 perskes [help, vanillaJS] Web-Component not updating variable

Hey folks, I've been trying this for two days and I tried every possible combination of what I found on google, my last resort is to ask for help here, as I know from the past that you guys and girls could always give me a nudge in the right direction.
I am creating a webcomponent that should be reusable with vanilla js.
Let's start with the HTML.
index.html
- In my HTML I link the multiselect.js File that contains my webcomponent.
- I then load my component with in the body
- At the bottom I have a script block to change the values "filter" and "options" in my webcomponent.

 

multiselect.js
This is the top where I define the template, html, css.
var template = document.createElement('template'); template.innerHTML = `  ... ` 
And this is the part of the webcomponent that is relevant. I didn't copy paste all here, because It's quite long.


My observer and constructor:
class multiselect extends HTMLElement { static get observedAttributes() { return ['filter', 'options']; } constructor() { super(); this.attachShadow({ mode: 'open' }); this.shadowRoot.appendChild(template.content.cloneNode(true)); } 


my connectedCallback()
if the filter and options value are not set (they are not when the component is loaded), I replace them with dummy values to test it.
 connectedCallback() { if (!this.filter) { this.filter = 2; console.log("conn call set to default filter", this.filter) } if (!this.options) { this.options = "cool string"; console.log("conn call set to default options", this.options) } this.render(); } 


my render() function:
render() { var options = this.options console.log("filter",this.filter) console.log("options",this.options) // important, "options" needs to be ready here // the rest of my code is in here. Ever manipulation of every data, element and what not } 

getter and setter

I'm gonna be very honest with you, this is the first time I work with getters and setters, and I think I only have basic understanding of it, but I also think I'm doing this right!
 get filter() { return this.getAttribute('filter'); } set filter(value) { this.setAttribute('filter', value); } get options() { return this.getAttribute('options'); } set options(value) { this.setAttribute('options', value); } 

And finally, my attributeChangedCallback() function.
 attributeChangedCallback(name, oldVal, newVal) { if (oldVal !== newVal) { switch (name) { case 'filter': this.filter = newVal; console.log("attr changed filter:", newVal) break; case 'options': this.options = newVal; console.log("attr changed options:", newVal) break; } } } 

And then the last line to finalize it:
window.customElements.define('multi-select', multiselect); 

#What happens..

  1. "attr changed" message from attributeChangedCallback shows up in the dev tools.
  2. "conn call" message from connectedCallback shows up and set's the default value for each option

attr changed filter: 2 conn call set to default filter 2 attr changed options: cool string conn call set to default options cool string 

  1. render() function get's called and the values for this.filter and this.option get logged
    console.log("filter",this.filter) console.log("options",this.options) 
Result in:
filter 2 options cool string 
  1. finally the values I do want to set get set by the script block at the bottom of my html.
    console.log("updating parameters") var el = document.getElementById('instrument-selection'); el.setAttribute("filter", "10") el.setAttribute("options", "a cool string")
Result in:
updating parameters attr changed filter: 10 attr changed options: a cool string 

As you can see, the "attr changed" message from my "attributeChangedCallback()" function get called, so the values change.
But when I try to access my "option" variable in the render() function, I cannot.


Note: I changed the "cool string" to an array because thats what my option needs to be. Code is here.
HTML: https://pastebin.com/VpGrwvtk
JS: https://pastebin.com/jGbbeeyg
Screenshot here: https://i.imgur.com/fWYA9rb.png

Note#2, I could not upload my code to pastebin as it said "possibly offensive content detected", I changed the word "boob" in the screenshot to "biib", just in case someone wonders why.
I'd be so glad if anyone could help, this is driving me nuts...
submitted by perskes to learnjavascript [link] [comments]


2022.01.27 14:56 thepoonies This isn’t meant as a critique - I honestly had the wrong perception of this subs meaning

I genuinely thought this sub was about:

I genuinely did not think this sub was primarily about:
I get that it’s likely an amalgamation of all the above but that final point to me seems so incompatible with reality.
It only seemed to become apparent to me after the Fox News interview drama that the choice to work was even an objective? Which, is moronic of me given the name of the sub and it’s description.
Anyone else here feeling misaligned with the purpose of this movement?
submitted by thepoonies to antiwork [link] [comments]


2022.01.27 14:56 PolyShaun Gargano reacts to ‘Johnny Wrestling’ chants at AEW Dynamite

Gargano reacts to ‘Johnny Wrestling’ chants at AEW Dynamite submitted by PolyShaun to CagesideSeatsPro [link] [comments]


2022.01.27 14:56 Roshankr1994 Steve Carell Returns On A Critical Mission in ‘Space Force’ Season 2 First Trailer

Steve Carell Returns On A Critical Mission in ‘Space Force’ Season 2 First Trailer submitted by Roshankr1994 to Netflixwatch [link] [comments]


2022.01.27 14:56 Psychological_Toe716 People who end everything they say with “lmao” are actually covering up a pain inside them that is eating away at their very being

lmao
submitted by Psychological_Toe716 to teenagers [link] [comments]


2022.01.27 14:56 unichiduci 1000 free NFTs for the Chess Community !

Get one on https://opensea.io/collection/gambit-club
Or claim a free chess piece NFT via our Discord channel: https://discord.io/GambitClubNFT
submitted by unichiduci to chess [link] [comments]


2022.01.27 14:56 Various-Challenge912 So when I ‘einrucken’ on my first day of rectrutenschule what will they ask for, and what will that first day be about?

submitted by Various-Challenge912 to Switzerland [link] [comments]


2022.01.27 14:56 Jojojets Lezhin Korea announced release of Night Flower book Vol 2. [Feb 3 @ 5pm] Along with a promo trailer with preview of the 4 new illustrations from BD . Link in post..

Lezhin Korea announced release of Night Flower book Vol 2. [Feb 3 @ 5pm] Along with a promo trailer with preview of the 4 new illustrations from BD . Link in post.. submitted by Jojojets to PainterOfTheNight [link] [comments]


2022.01.27 14:56 lss_bvt_ios_03 LssTest-TextPostTitle

LssTest-TextPostContent
submitted by lss_bvt_ios_03 to Lsstesting [link] [comments]


2022.01.27 14:56 rockerswise Derrick Morgan - Bad Luck on Me

Derrick Morgan - Bad Luck on Me submitted by rockerswise to reggae [link] [comments]


2022.01.27 14:56 whatisthatthingdude Looking for movies like Peppermint, Law Abiding Citizen, The Next Three Days, Enough, Promising Young Woman

I'm looking for movies like the ones i mentioned in the title. To be honest i dunno whats common between these movies other than the revenge plot (except The Next Three Days) ///// I'm sorry for my broken english. Its not my native language.
submitted by whatisthatthingdude to MovieSuggestions [link] [comments]


2022.01.27 14:56 PolyShaun Roman Reigns says he’s still feeling the effects of COVID

Roman Reigns says he’s still feeling the effects of COVID submitted by PolyShaun to CagesideSeatsPro [link] [comments]


2022.01.27 14:56 pauls1man $IO squeezed the other way

submitted by pauls1man to Shortsqueeze [link] [comments]


2022.01.27 14:56 Staggvillainy Liner notes of Leaves reissue transcribed

submitted by Staggvillainy to unwound [link] [comments]


2022.01.27 14:56 JermFitnessAndHarley Today Is a good day. Bottom end rebuild is complete and being sent back.

Today Is a good day. Bottom end rebuild is complete and being sent back. submitted by JermFitnessAndHarley to Harley [link] [comments]


2022.01.27 14:56 gunark75 Jonathan Chew: Man jailed for eight weeks for accosting Sir Chris Whitty

Jonathan Chew: Man jailed for eight weeks for accosting Sir Chris Whitty submitted by gunark75 to unitedkingdom [link] [comments]


2022.01.27 14:56 rudimentaryblues Thoughts on this? This tweet is almost 4 months ago.

Thoughts on this? This tweet is almost 4 months ago. submitted by rudimentaryblues to SaitamaInu_Official [link] [comments]


2022.01.27 14:56 Fluffurs Is "Plan-Aheaditor" a real position in the writing process? Image is from Mega Man #18

Is submitted by Fluffurs to ComicWriting [link] [comments]


2022.01.27 14:56 rickandtwocrows Best broker for leverage on shorting options

I love thinkorswim charting
I've been trading options for ~6 years now.
But I was wondering what the best broker is for shorting options on a margin in terms of leverage for USA residents.
Any personal recommendations?
submitted by rickandtwocrows to thinkorswim [link] [comments]


2022.01.27 14:56 Harryhood23 Think of the itch

Think of the itch submitted by Harryhood23 to MakeMeSuffer [link] [comments]


2022.01.27 14:56 starfeed 220126 Members Twitter (Taedong)

220126 Members Twitter (Taedong) submitted by starfeed to OMEGAX [link] [comments]


2022.01.27 14:56 ohboymykneeshurt Danish troops to leave Mali after call from country's rulers

submitted by ohboymykneeshurt to worldnews [link] [comments]


2022.01.27 14:56 Large-Wheel-4181 Hey wait a minute

Hey wait a minute submitted by Large-Wheel-4181 to memes [link] [comments]


2022.01.27 14:56 tatzesOtherAccount ich😖iel

ich😖iel submitted by tatzesOtherAccount to ich_iel [link] [comments]


http://365lingualife.ru